title: Azure queue max TTL
body: <p>Maybe someone can explain me why Azure queues has a max TTL of 7 days? </p>
  
  <p>I am used to work with NServicebus where events (messages) would be an important part of a business process and this of course may never be deleted. I really like the way queues gives me reliable communication where events eventually will be processed in independent applications.</p>
  
  <p>So why is it MS have this max retention period? And why 7 days, because it is a whole week? I really like to understand their reason. I known I could create a Queue-trigger and store them elsewhere.</p>
  
  <p>Also read this feedback voting for this to be changed.
  <a href="https://feedback.azure.com/forums/217298-storage/suggestions/4134167-infinite-ttl-for-queue-messages?category_id=69698" rel="nofollow noreferrer">https://feedback.azure.com/forums/217298-storage/suggestions/4134167-infinite-ttl-for-queue-messages?category_id=69698</a></p>
  
  <p>EDIT: This has now been changed with a new version of WindowsAzure.Storage. This compares the old and new behavior.</p>
  
  <pre><code>        //WindowsAzure.Storage 8.7
          queue.AddMessage(message); // TTL is 7 days
          queue.AddMessage(message, TimeSpan.MaxValue); // Throws The argument 'timeToLive' is larger than maximum of '7.00:00:00'
  
          //WindowsAzure.Storage 9.0
          queue.AddMessage(message); // TTL is 7 days
          queue.AddMessage(message, TimeSpan.MaxValue); //Expiration Time is now 31.dec 9999
  </code></pre>