[rabbitmq-discuss] rabbitmq query

Eugene Kirpichov ekirpichov at gmail.com
Mon Sep 12 12:15:43 BST 2011


Nithesh,

I understand that the current semantics of RabbitMQ is far from being
satisfactory for you.

I was asking whether *another* semantics (push message to front of
queue) would be - I'm trying to persuade you that probably your
problem is ill-formulated and there doesn't exist a solution to it at
all, so perhaps you may have to rethink the problem :)

On Mon, Sep 12, 2011 at 1:42 PM, Nithesh Shetty
<knitheshshetty at yahoo.com> wrote:
>>Assume you have 2 consumers A,B; they get a message each - MA,MB, and
>>then A crashes (requeueing MA) and then B crashes (requeueing MB). The
>>mutual ordering of MA and MB in the queue is now still not equal to
>>the order in which they were in the queue initially. Would this
>>situation be ok from your application's point of view?
>
> when u requeue MA/MB then those message will be placed at the back of the
> queue changing the order.
>
> If this is what happens then it won't help me.
>
> Please confirm.
>
> Nithesh
>
> From: Eugene Kirpichov <ekirpichov at gmail.com>
> To: Nithesh Shetty <knitheshshetty at yahoo.com>
> Cc: Emile Joubert <emile at rabbitmq.com>;
> "rabbitmq-discuss at lists.rabbitmq.com" <rabbitmq-discuss at lists.rabbitmq.com>
> Sent: Monday, September 12, 2011 2:52 PM
> Subject: Re: [rabbitmq-discuss] rabbitmq query
>
> Hi Nithesh,
>
> Would it be ok for you if RabbitMQ placed unack'd messages after a
> reconnect to the front of the queue?
>
> Because this strategy does not always behave intuitively with respect
> to message ordering either (unless you have exactly 1 consumer).
>
> Assume you have 2 consumers A,B; they get a message each - MA,MB, and
> then A crashes (requeueing MA) and then B crashes (requeueing MB). The
> mutual ordering of MA and MB in the queue is now still not equal to
> the order in which they were in the queue initially. Would this
> situation be ok from your application's point of view?
>
> On Mon, Sep 12, 2011 at 1:09 PM, Nithesh Shetty
> <knitheshshetty at yahoo.com> wrote:
>> In that case it won't help us since. our system is a online trading system
>>
>> and the order of the messages has to be maintained in any case.
>>
>> Thanks for u r help emile.
>>
>> Nithesh
>>
>> From: Emile Joubert <emile at rabbitmq.com>
>> To: Nithesh Shetty <knitheshshetty at yahoo.com>
>> Cc: "rabbitmq-discuss at lists.rabbitmq.com"
>> <rabbitmq-discuss at lists.rabbitmq.com>
>> Sent: Monday, September 12, 2011 2:32 PM
>> Subject: Re: [rabbitmq-discuss] rabbitmq query
>>
>> Hi Nitesh,
>>
>> Op 12/09/11 09:45, het Nithesh Shetty geskryf:
>>>>Examples where the condition of a single path does not hold is when a
>>>>consumer reconnects or requeues messages. In these cases you cannot rely
>>>>on messages being received in publication order.
>>>
>>> When u say reconnects or requeues. I assume that the application using
>>> queue to receive message crashes and then it connects
>>> again to receive the message at that moment u cannot gaurantee the order
>>> right
>>
>> If a consumer holds unacknowledged messages when it disconnects then the
>> broker needs to return those messages to the queue. The current version
>> of rabbit places those messages at the back of the queue, so you cannot
>> rely on the order of messages once a reconnect occurs.
>>
>> The same goes for AMQP methods that accept a "requeue" argument like
>> basic.reject, basic.recover and basic.nack.
>>
>> -Emile
>>
>>
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
>
>
>
> --
> Eugene Kirpichov
> Principal Engineer, Mirantis Inc. http://www.mirantis.com/
> Editor, http://fprog.ru/
>
>
>



-- 
Eugene Kirpichov
Principal Engineer, Mirantis Inc. http://www.mirantis.com/
Editor, http://fprog.ru/


More information about the rabbitmq-discuss mailing list