title: Do messages in dead letter queues in Azure Service Bus expire?
body: <p>Do messages in dead letter queues in Azure Service Bus expire?</p>
  
  <h2>Some explanation</h2>
  
  <p>I have these queue settings:</p>
  
  <pre><code>var queueDescription = new QueueDescription("MyTestQueue")
  {
      RequiresSession = false,
      DefaultMessageTimeToLive = TimeSpan.FromMinutes(1),
      EnableDeadLetteringOnMessageExpiration = true,
      MaxDeliveryCount = 10
  };
  
  namespaceManager.CreateQueue(queueDescription);
  </code></pre>
  
  <p>When I place some messages in a Azure Service Bus message queue (not queues from Azure Storage) and don't consume them (ever), they'll be moved to the dead letter queue automatically.</p>
  
  <p>However, if I have no consumer for the dead letter queue either, will the messages ever be deleted from the dead letter queue or will they stay there forever? (Is there some official documentation stating how this is supposed to work?)</p>
  
  <h2>My Trials</h2>
  
  <p>In my trials, I placed <em>3 messages</em> in the queue. They were dead lettered after 2 minutes or so. They remained in the dead letter queue for at least a day and weren't removed.</p>
  
  <p><img src="https://i.stack.imgur.com/lRtwh.png" alt="Message Queue Statistics"></p>
  
  <p>Although calling <a href="http://msdn.microsoft.com/en-us/library/Dn130225%28v=VS.100,d=hv.2%29.aspx" rel="nofollow noreferrer">NamespaceManager.GetQueueAsync()</a> gave me the values above (notice how <code>MessageCount</code> is still <code>3</code> but <code>DeadLetterMessageCount</code> is strangely <code>0</code>), I could still receive the messages from the dead letter queue. (So they weren't removed from the queue.)</p>