[rabbitmq-discuss] Publisher confirms always wait for consumer ack/nack
Bertrand LEMASLE
blemasle at allocine.fr
Wed Jan 22 17:07:56 GMT 2014
Hi,
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
consumer.
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 ?
Using :
* 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 !
Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140122/a7aa4e91/attachment.html>
More information about the rabbitmq-discuss
mailing list