[rabbitmq-discuss] Synchronous confirmation of delivery to the queue

Matthew Sackman matthew at rabbitmq.com
Mon Jul 5 10:42:02 BST 2010


On Mon, Jul 05, 2010 at 11:05:00AM +0300, Andrius Norkaitis wrote:
> I have publisher which send message to consumer (using direct exchange and
> non-durable, autodelete queue) and it needs instant confirmation that the
> message is routed to the query. I can't use asynchronous IModel.BasicReturn
> event because I need to know is message routed to query instantly after I
> call publish method. I think it may be done using autodelete queue,
> mandatory and immediate message flags, and transactions. If subscriber is
> offline there would be no query to deliver the message so publisher should
> get exception after it calls publish method.

The immediate is pretty meaningless in the context of a transaction, and
we largely reinterpret it as mandatory. I suspect you just want to use
mandatory and a transaction.

However note that if you're doing a commit per publish, performance will
be rather slower. This may not affect your application, depending on its


More information about the rabbitmq-discuss mailing list