<div dir="ltr"><div><div>Hi,</div></div><div><br></div><div>After reading many docs and mails on this subject (<a href="http://www.rabbitmq.com/confirms.html">http://www.rabbitmq.com/confirms.html</a> 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.</div>
<div><br></div><div>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 ?<br>
</div><div><br></div><div>Using :</div><div> * RabbitMQ 3.2.2 on Erlang R16B</div><div> * .Net client 3.2.1</div><div><br></div><div>Here is the basic code I'm using to publish my message :</div><div><br></div><div><div>
IBasicProperties properties = Channel.CreateBasicProperties();</div><div>properties.MessageId = Guid.NewGuid().ToString();</div><div>properties.DeliveryMode = 2; //persistent</div><div><br></div><div>Channel.BasicPublish(Exchange, routingKey, true, properties, message);</div>
<div>published = Channel.WaitForConfirms(TimeSpan.FromSeconds(timeout), out timedout) && !timedout;</div></div><div><br></div><div>For those who aren't familiar with the .Net client, the "true" argument on BasicPublish set the mandatory flag.</div>
<div><br></div><div>With my 10 seconds waiting consumer, published is always false as long as the timeout is less than those 10 seconds...</div><div><br></div><div>What am I doing wrong ? Any help would be deeply appreciated !</div>
<div><br></div><div>Cheers</div>
</div>