<div>I am testing the durability of my message app and noticed messages being dropped if I restart the broker. I&#39;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&#39;ve set the exchange to durable, the queue to durable, and the message delivery to &quot;2&quot; - 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 = &quot;localhost&quot;;</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(&quot;ug.message&quot;, 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(&quot;ug.message.rtls&quot;, 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(&quot;ug.message.rtls&quot;, &quot;ug.message&quot;, &quot;#&quot;, 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 &lt; 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(&quot;Yo Mama soo fat...&quot; + 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(&quot;ug.message&quot;, &quot;ug.message.rtls.move&quot;, 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(&quot;Published message &quot; + 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>