[rabbitmq-discuss] Published message not queued after publish-ok received when connection quickly closed

Michael Klishin michael.s.klishin at gmail.com
Fri Jul 8 15:30:27 BST 2011


2011/7/8 Michael Klishin <michael.s.klishin at gmail.com>

> 2011/7/8 Michael Nacos <m.nacos at gmail.com>
>
>> so, what's currently the best way to publish messages consumed from one
>> queue into another with the amqp gem?
>>
>
> Just republish them or take
>

Disregard this part. I now understand the question better. With a multi-step
workflow, when one application (A1) consumes messages from one queue,
processes them and publishes the original message or a different one to
another queue, you need to use a combination of features:

1. Explicit message acknowledgements

http://rubydoc.info/github/ruby-amqp/amqp/master/file/docs/Queues.textile#Message_acknowledgements


2. Publisher confirmations

The only way to know that your re-published message is received by the
broker is to receive an acknowledgement from it.
I now realize that documentation section does not provide any code examples.
I will put something together later today.

http://rubydoc.info/github/ruby-amqp/amqp/master/file/docs/Exchanges.textile#Using_Publisher_Confirms_extension_to_AMQP_0_9_1


So A1 would consume a message, process it, republish it and as soon as
publishing confirmation arrives, A1 acknowledges the original one.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110708/b41e7b0e/attachment.htm>


More information about the rabbitmq-discuss mailing list