Hi,

I am using mq through nanite.
I have noticed that a few messages spend way too much in the queue,
due to which duplicate reposting of message occurs.
Is there any way to track the life cycle of a message in the queue.
For eg how much time the message has spent in the queue.

Thank you.
Akhil

Search Discussions

  • Tony Garnock-Jones at Feb 25, 2010 at 9:04 am

    akhil wrote:
    I have noticed that a few messages spend way too much in the queue,
    due to which duplicate reposting of message occurs.
    Hmm. The only way that could happen is either if no-one is listening to
    that queue, or if whoever receives the message for some reason fails to
    acknowledge it before disconnecting. What could be causing that, in your
    application?
    Is there any way to track the life cycle of a message in the queue.
    For eg how much time the message has spent in the queue.
    I'm afraid there's nothing like that at present.

    Regards,
    Tony
  • Akhil Kodali at Feb 25, 2010 at 11:46 am
    Hi,

    The queue doesnot duplicate the message, the application happens to post it
    as it is unable to determine what is in the queue.

    To avoid duplicates one way is to expire out the messages in the queue after
    certain period of time, anyway to configure it.
    Currently I am checking it at the application level.

    ----
    Regards,
    Akhil Kodali


    On Thu, Feb 25, 2010 at 2:34 PM, Tony Garnock-Jones wrote:

    akhil wrote:
    I have noticed that a few messages spend way too much in the queue,
    due to which duplicate reposting of message occurs.
    Hmm. The only way that could happen is either if no-one is listening to
    that queue, or if whoever receives the message for some reason fails to
    acknowledge it before disconnecting. What could be causing that, in your
    application?
    Is there any way to track the life cycle of a message in the queue.
    For eg how much time the message has spent in the queue.
    I'm afraid there's nothing like that at present.

    Regards,
    Tony
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100225/fce5e672/attachment.htm
  • Tony Garnock-Jones at Mar 3, 2010 at 10:54 pm

    Akhil Kodali wrote:
    The queue doesnot duplicate the message, the application happens to post
    it as it is unable to determine what is in the queue.
    Is it doing something like resending a request if it doesn't receive a
    reply quickly enough? The only way you can deal with this is to somehow
    make requests idempotent, by discarding duplicates on the receiving side.
    To avoid duplicates one way is to expire out the messages in the queue
    after certain period of time, anyway to configure it.
    Currently I am checking it at the application level.
    The application level is all there is at the moment. There is an
    "expiration" field associated with each message that is intended to be
    used to permit the server to GC old messages, but RabbitMQ does not
    currently implement it, in part because it's tricky technically (I know,
    I know, it shouldn't be, but there you have it), and in part because the
    AMQP standard is in fact silent on both the syntax and the meaning of
    the field (!!).

    So it sounds like you're currently on the right approach: discarding
    duplicates at the receiving end, based on either or both of an expiry
    time and a unique message ID.

    Regards,
    Tony

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedFeb 15, '10 at 8:14p
activeMar 3, '10 at 10:54p
posts4
users2
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase