[openstack-dev] [oslo.messaging] [mistral] Acknowledge feature of RabbitMQ in oslo.messaging
sileht at sileht.net
Tue Jul 7 11:07:51 UTC 2015
The RPC API of oslo.messaging do it for you, you don't have to care
about acknowledgement (or anything else done by the driver because the
underlying used pattern depends of it) .
For the "Working Queues" patterns, I guess what you need is to ensure
that the Target doesn't have the "server" attribute set and use "call"
or "cast" depending of your needs.
It works like this for rabbitmq:
* the message is acknowledged from the rabbitmq PoV when the worker
start the processing of the message
* when it finish it send a message back to the caller with the result
of the processing or the raised exception if that doesn't work
On the client side, when you use "call" is wait for the returns.
If you don't need to get the result or the exception occurred during the
message processing just use "cast", it doesn't wait for the return and
worker doesn't send it.
When RPC is needed, acknowledgement after the message have been
processed is not enough reliable to ensure the message have been
processed correctly and can lead to stuck message on the queue.
Otherwise, the Notification API of oslo.messaging allows to control
acknowledgement or requeue of message but does not provide method and
endpoint versioning (that allows rolling upgrade for example), and
remote executed method are hardcoded to match the notification mechanism
mail: sileht at sileht.net
Le 2015-07-07 12:13, Renat Akhmerov a écrit :
> Just to clarify: what we’re looking for is how to implement “Work
> queue” pattern described at  with oslo messaging. As Nikolay said,
> it requires that a message to be acknowledged after it has been
>  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>
>> I am using RabbitMQ as the backend and searched oslo.messaging for
>> message acknowledgement feature but I found only  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?
>> Best Regards,
>> @Mirantis Inc.
>> OpenStack Development Mailing List (not for usage questions)
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> OpenStack Development Mailing List (not for usage questions)
> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
More information about the OpenStack-dev