<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><SPAN style="RIGHT: auto">
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">>Assume you have 2 consumers A,B; they get a message each - MA,MB, and<BR>>then A crashes (requeueing MA) and then B crashes (requeueing MB). The<BR>>mutual ordering of MA and MB in the queue is now still not equal to<BR>>the order in which they were in the queue initially. Would this<BR>>situation be ok from your application's point of view?</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">when u requeue MA/MB then those message will be placed at the back of the queue changing the order.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">If this is what happens then it won't help me.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Please confirm.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Nithesh</SPAN></div>
<div style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR><BR style="RIGHT: auto" class=yui-cursor></SPAN></div>
<div><BR></div>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Eugene Kirpichov <ekirpichov@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Nithesh Shetty <knitheshshetty@yahoo.com><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> Emile Joubert <emile@rabbitmq.com>; "rabbitmq-discuss@lists.rabbitmq.com" <rabbitmq-discuss@lists.rabbitmq.com><BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, September 12, 2011 2:52 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [rabbitmq-discuss] rabbitmq query<BR></FONT><BR>Hi Nithesh,<BR><BR>Would it be ok for you if RabbitMQ placed unack'd
messages after a<BR>reconnect to the front of the queue?<BR><BR>Because this strategy does not always behave intuitively with respect<BR>to message ordering either (unless you have exactly 1 consumer).<BR><BR>Assume you have 2 consumers A,B; they get a message each - MA,MB, and<BR>then A crashes (requeueing MA) and then B crashes (requeueing MB). The<BR>mutual ordering of MA and MB in the queue is now still not equal to<BR>the order in which they were in the queue initially. Would this<BR>situation be ok from your application's point of view?<BR><BR>On Mon, Sep 12, 2011 at 1:09 PM, Nithesh Shetty<BR><<A href="mailto:knitheshshetty@yahoo.com" ymailto="mailto:knitheshshetty@yahoo.com">knitheshshetty@yahoo.com</A>> wrote:<BR>> In that case it won't help us since. our system is a online trading system<BR>><BR>> and the order of the messages has to be maintained in any case.<BR>><BR>> Thanks for u r help emile.<BR>><BR>>
Nithesh<BR>><BR>> From: Emile Joubert <<A href="mailto:emile@rabbitmq.com" ymailto="mailto:emile@rabbitmq.com">emile@rabbitmq.com</A>><BR>> To: Nithesh Shetty <<A href="mailto:knitheshshetty@yahoo.com" ymailto="mailto:knitheshshetty@yahoo.com">knitheshshetty@yahoo.com</A>><BR>> Cc: "<A href="mailto:rabbitmq-discuss@lists.rabbitmq.com" ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</A>"<BR>> <<A href="mailto:rabbitmq-discuss@lists.rabbitmq.com" ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</A>><BR>> Sent: Monday, September 12, 2011 2:32 PM<BR>> Subject: Re: [rabbitmq-discuss] rabbitmq query<BR>><BR>> Hi Nitesh,<BR>><BR>> Op 12/09/11 09:45, het Nithesh Shetty geskryf:<BR>>>>Examples where the condition of a single path does not hold is when a<BR>>>>consumer reconnects or requeues messages. In these cases
you cannot rely<BR>>>>on messages being received in publication order.<BR>>><BR>>> When u say reconnects or requeues. I assume that the application using<BR>>> queue to receive message crashes and then it connects<BR>>> again to receive the message at that moment u cannot gaurantee the order<BR>>> right<BR>><BR>> If a consumer holds unacknowledged messages when it disconnects then the<BR>> broker needs to return those messages to the queue. The current version<BR>> of rabbit places those messages at the back of the queue, so you cannot<BR>> rely on the order of messages once a reconnect occurs.<BR>><BR>> The same goes for AMQP methods that accept a "requeue" argument like<BR>> basic.reject, basic.recover and basic.nack.<BR>><BR>> -Emile<BR>><BR>><BR>><BR>> _______________________________________________<BR>> rabbitmq-discuss mailing list<BR>> <A
href="mailto:rabbitmq-discuss@lists.rabbitmq.com" ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</A><BR>> <A href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target=_blank>https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</A><BR>><BR>><BR><BR><BR><BR>-- <BR>Eugene Kirpichov<BR>Principal Engineer, Mirantis Inc. <A href="http://www.mirantis.com/" target=_blank>http://www.mirantis.com/</A><BR>Editor, <A href="http://fprog.ru/" target=_blank>http://fprog.ru/</A><BR><BR><BR></DIV></DIV></div></body></html>