Search code examples
azurettlazure-queues

Azure queue max TTL


Maybe someone can explain me why Azure queues has a max TTL of 7 days?

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.

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.

Also read this feedback voting for this to be changed. https://feedback.azure.com/forums/217298-storage/suggestions/4134167-infinite-ttl-for-queue-messages?category_id=69698

EDIT: This has now been changed with a new version of WindowsAzure.Storage. This compares the old and new behavior.

        //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

Solution

  • Looks like this limitation has been removed with the new C# Storage SDK V9.0.0 which uses new REST API versions, although I cant find any reference to these REST APIs anywhere or anything on the storage blog. https://github.com/Azure/azure-storage-net/blob/master/changelog.txt

    I have tested this and it works with V9.0.0 of the Storage SDK, the TTL can be infinite.

    08/02/2018