[openstack-dev] [oslo.messaging] [mistral] Acknowledge feature of RabbitMQ in oslo.messaging

Zane Bitter zbitter at redhat.com
Tue Jul 7 21:54:55 UTC 2015


On 07/07/15 06:13, Renat Akhmerov wrote:
> Just to clarify: what we’re looking for is how to implement “Work queue”
> pattern described at [1] with oslo messaging. As Nikolay said, it
> requires that a message to be acknowledged after it has been processed.

Yeah, so as you've discovered, oslo.messaging has no support for 
reliable asynchronous messaging. (Synchronous messaging in the form of 
'call' can be somewhat reliable - in the sense that as long as the 
caller is still alive it can retry until it gets a reply.)

In theory you could modify oslo.messaging to ack the message _after_ 
processing, but in practice I don't know how much that would help. IIRC 
Rabbit's acknowledgement mechanism still exhibits some flakiness when 
viewed from end-to-end, but even if that's wrong the very best you could 
say about it is that it's completely dependent on what settings are used 
in the RabbitMQ deployment - which are completely opaque to you. Since 
no project really 'owns' the semantics of Rabbit I don't believe there's 
any docs saying how it must be deployed, and if there is such a project 
then it's oslo.messaging and that acks messages before acting them so 
it's unlikely that it's docs call out the importance of reliable 
end-to-end delivery.

The way I see it, there are two other options that would be preferable:

1) Implement your own acks. Save the msg content to the DB, send a 
RabbitMQ message, delete the message from the DB once it's processed, 
have a periodic task to resend any messages that have timed out. Or
2) Zaqar

cheers,
Zane.

> [1] http://www.rabbitmq.com/tutorials/tutorial-two-python.html
>
> Renat Akhmerov
> @ Mirantis Inc.
>
>
>
>> On 07 Jul 2015, at 15:58, Nikolay Makhotkin <nmakhotkin at mirantis.com
>> <mailto:nmakhotkin at mirantis.com>> wrote:
>>
>> Hi,
>>
>> I am using RabbitMQ as the backend and searched oslo.messaging for
>> message acknowledgement feature but I found only [1] what is wrong
>> using of acknowledgement since it acknowledges incoming message before
>> it has been processed (while it should be done only after processing
>> the message, otherwise we can lost given message if, say, the server
>> suddenly goes down).
>>
>> So, my questions: does oslo.messaging indeed not support correct
>> acknowledgement feature? Or it is impossible to do for oslo.messaging
>> paradighm? Or is it somehow connected with that oslo.messaging has to
>> support a lot of transport types?
>>
>> Can't it be implemented somehow in oslo.messaging?
>>
>> [1]
>> https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/rpc/dispatcher.py#L135
>>
>>
>> Best Regards,
>> Nikolay
>> @Mirantis Inc.
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: OpenStack-dev-request at lists.openstack.org
>> <mailto:OpenStack-dev-request at lists.openstack.org>?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>




More information about the OpenStack-dev mailing list