[rabbitmq-discuss] Publish with immediate for dynamic worker creation?

Robert Raschke rtrlists at googlemail.com
Wed Oct 7 12:28:01 BST 2009


I'm wondering if I'm wandering the right path here. (I'm using 1.6.0 with
erlang client.)

I was intending to use a basic.publish with mandatory and immediate set to
true, and a return handler to allow me to add new workers reading from a

I create a work queue with a return handler and a reply queue. I also create
one initial worker, subscribing to the work queue with no_ack set to false.

I then publish a work message onto the work queue and the worker picks it
up, does the work and publishes the answer back into the reply queue.

My intention was that my work message publish uses the immediate flag to
generate a basic.return if the message cannot be immediately delivered. I
thought that if my worker is busy it won't get the next message, leading to
the basic.return. But I believe my thinking is wrong. It looks like the
second work message is routed to the initial work consumer immediately, even
if it is still busy.

Have I overlooked something obvious, or would I need to implement a 1
message flow control on the channel that the work consumer is using?

Thanks for any pointers,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20091007/0d2af3b3/attachment.htm 

More information about the rabbitmq-discuss mailing list