Results 1 to 3 of 3

Thread: distinguishing rejected message from expired message

  1. #1

    Question distinguishing rejected message from expired message

    Hi ,

    When a consumer throws AmqpRejectAndDontRequeueException, message is reject and delivered to dead letter exchange,
    Similarly when the life of the message in queue becomes > x-message-ttl of a queue , messages are again sent to the dead letter exchange,
    In such cases how can a dead letter queue consumer distinguish these two condition, Does SI/Spring amqp sets some special header in case of AmqpRejectAndDontRequeueException? Or is there a hook/provision in SI/spring amqp to do such thing?

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,012

    Default

    The consumer is not given any opportunity to modify the message, we just get to reject it (with requeue or not). I don't know if rabbit itself provides any mechanism to determine the reason for routing to the DLE/DLQ; I suggest you ask over there... https://lists.rabbitmq.com/cgi-bin/m...bbitmq-discuss
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3

    Default

    thanks Gary,
    I figured it out. basically rabbit lets one identify the the cause for dead lettering,infact it give a detailed list of things happened with the 'declared dead' message. all these information are available as part of message headers.

    ferer section Dead-Lettered Messages in http://www.rabbitmq.com/extensions.html

Tags for this Thread

Posting Permissions

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