[rabbitmq-discuss] Publisher confirms always wait for consumer ack/nack
blemasle at allocine.fr
Wed Jan 22 17:07:56 GMT 2014
After reading many docs and mails on this subject (
http://www.rabbitmq.com/confirms.html included which explains when a
message will be confirmed), I still haven't found an answer to my question.
When using publisher confirm (by using confirmSelect on the channel),
messages aren't ack until they are either ack or nack by at least one
I've created a rather simple consumer that wait for 10 seconds then ack the
message and noticed that the publisher ack arrives only once the consumer
acked the message. By the meantime, shouldn't the message be persisted to
the disk and so, the publisher ack be sent back ?
* RabbitMQ 3.2.2 on Erlang R16B
* .Net client 3.2.1
Here is the basic code I'm using to publish my message :
IBasicProperties properties = Channel.CreateBasicProperties();
properties.MessageId = Guid.NewGuid().ToString();
properties.DeliveryMode = 2; //persistent
Channel.BasicPublish(Exchange, routingKey, true, properties, message);
published = Channel.WaitForConfirms(TimeSpan.FromSeconds(timeout), out
timedout) && !timedout;
For those who aren't familiar with the .Net client, the "true" argument on
BasicPublish set the mandatory flag.
With my 10 seconds waiting consumer, published is always false as long as
the timeout is less than those 10 seconds...
What am I doing wrong ? Any help would be deeply appreciated !
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss