<div>I am testing the durability of my message app and noticed messages being dropped if I restart the broker. I'm running the broker directly in a console using </div><div>rabbitmq_server-2.1.1\sbin\rabbitmq-server.bat</div>
<div><br></div><div>I then publish 10,000 messages and I've set the exchange to durable, the queue to durable, and the message delivery to "2" - as I understand this to be the configuration for messages to be durable. I then use the rabbitmqctl list_queues to show the 10,000 messages. I close the broker window, to mimic a hard shutdown of a server. When I start the broker back up and list the queues I see 8,428 messages. </div>
<div><br></div><div>Do you know why I would lose messages?</div><div><br></div><div>My environment is: Windows 7 64bit and am running RabbitMQ 2.1.1 (disk node) on top of Erlang 8.1.1.</div><div><br></div><div>My publisher code looks like:</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><font class="Apple-style-span" color="#000099">var connectionFactory = new ConnectionFactory();</font><div>
<font class="Apple-style-span" color="#000099">connectionFactory.Address = "localhost";</font></div><div><font class="Apple-style-span" color="#000099"><br></font></div><div><font class="Apple-style-span" color="#000099">using (IConnection connection = connectionFactory.CreateConnection())</font></div>
<div><font class="Apple-style-span" color="#000099">{</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">using (IModel model = connection.CreateModel())</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">{</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">model.ExchangeDeclare("ug.message", ExchangeType.Topic, true);</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">model.QueueDeclare("ug.message.rtls", true);</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">model.QueueBind("ug.message.rtls", "ug.message", "#", false, null);</font></div>
<div><font class="Apple-style-span" color="#000099"><br></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">for (int i = 0; i < 10000; i++)</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">{</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                        </font></span><font class="Apple-style-span" color="#000099">IBasicProperties messageProperties = model.CreateBasicProperties();</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                        </font></span><font class="Apple-style-span" color="#000099">messageProperties.DeliveryMode = 2;</font></div><div>
<font class="Apple-style-span" color="#000099"><br></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                        </font></span><font class="Apple-style-span" color="#000099">byte[] message = System.Text.Encoding.UTF8.GetBytes("Yo Mama soo fat..." + i);</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                        </font></span><font class="Apple-style-span" color="#000099">model.BasicPublish("ug.message", "ug.message.rtls.move", messageProperties, message);</font></div>
<div><font class="Apple-style-span" color="#000099"><br></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                        </font></span><font class="Apple-style-span" color="#000099">System.Console.WriteLine("Published message " + i);</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">}</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">}</font></div>
<div><font class="Apple-style-span" color="#000099">}</font></div><div><font class="Apple-style-span" color="#000099"><br></font></div><div>Any help would be greatly appreciated.</div><div><font class="Apple-style-span" color="#000099"><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><br>
</span></font></div><div><font class="Apple-style-span" color="#000099"><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">Thank you,</span></font></div><div><font class="Apple-style-span" color="#000099"><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">Dave</span></font></div>