Results 1 to 2 of 2

Thread: Requeue msg with SimpleMessageListenerContainer

  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Default Requeue msg with SimpleMessageListenerContainer

    Hi,

    I'm working with SimpleMessageListenerContainer (org.springframework.amqp.rabbit.listener) and would like to reorder the messages received by rejecting messages that aren't delivered in order (preferably by throwing an exception) and having them re queued for future handling. Is this possible? How do I define the redelivery policy?

    Thanks,

    Lior

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    The redelivery behaviour is basically fixed by the broker (and by the spec): anything that is not delivered is re-inserted at the back of the queue. Hope that works for you.

    There are some patterns you could implement to change that behaviour at the application level, e.g. a special queue for redeliveries (we have discussed having this as a framework feature, but it isn't very high on the list for 1.0). The actual order of delivery is always going to be difficult to manage in any great detail since it is the broker that controls the persistence and queue semantics at the protocol level.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •