[rabbitmq-discuss] Best practices about expiration of messages

PADIOU Pierre-Marie (MORPHO) pierre-marie.padiou at morpho.com
Tue Sep 6 13:42:15 BST 2011


Hello,

Here is the thing :
- I've got a producer P and a consumer C.
- Pattern is request-response.

P constantly submit requests to consumers and wait for an answer for a given amount of time. Should C take longer to answer, P will consider there was a time-out and it just sends message N+1, discarding any answer related to N.

Thing is, if nothing is done, C will still process all messages it receives (and send response that will be discarded). This makes C accumulate messages in case they take an unusually long time to process.

I suppose this is a common problem. I was wondering if anyone had a best practice for this. Here are the ideas I got :
- P creates a different response queue for each message, C checks whether the response queue exists before processing a message
- Assuming P and C are time synchronized, P sends an expiration date along with each message, that C will check before doing anything

Any better idea would be appreciated,

Thanks,

Pierre-Marie
#
" Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles ou ayant un caractère privé. S'ils ne vous sont pas destinés, nous vous signalons qu'il est strictement interdit de les divulguer, de les reproduire ou d'en utiliser de quelque manière que ce soit le contenu. Si ce message vous a été transmis par erreur, merci d'en informer l'expéditeur et de supprimer immédiatement de votre système informatique ce courriel ainsi que tous les documents qui y sont attachés."
******
" This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110906/279e5d57/attachment.htm>


More information about the rabbitmq-discuss mailing list