[rabbitmq-discuss] is anybody using 'immediate' publish?
ask at rabbitmq.com
Fri Sep 14 15:09:34 BST 2012
On 14 Sep 2012, at 13:48, Matthias Radestock <matthias at rabbitmq.com> wrote:
> On 14/09/12 13:34, Randall Richard wrote:
>> Admittedly, I'm not fully aware of exactly how it works. It would be
>> helpful to have a better understanding of the semantics. Can you
>> explain what the publisher is notified of (if anything?) when there are
>> 10 queues bound to an exchange named HighPriority, a message with
>> immediate flag true is published to HighPriority, and 7 out of the 10
>> queues have the message consumed immediately.
> No notification is sent to the publisher in that case. A basic.return is only sent if *no* queues were able to send the message to a consumer immediately.
> Here are a few more warts about 'immediate':
> - while a message might get sent out to a consumer straight away, there is of course no guarantee that such a message will reach the consumer, get processed and ack'ed. If any of these steps go wrong the message will end up in the queue (unless the consuming happened with no-ack, in which case it is simply lost), even though supposedly it was delivered immediately.
> - a queue can have a consumer and yet 'immediate' delivery may fail (and a basic.return issued) because:
> a) the consumer isn't quick enough and a backlog of messages has built up,
> b) the consumer has configured a 'basic.qos' prefetch count and that the limit has been reached
Couldn't it be possible emulate immediate by delivering to a TTL'ed queue, then having a dead-letter queue that the publisher consumes from to be notified that a message has not been consumed?
More information about the rabbitmq-discuss