Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure storage queue message (show at specific time)

How can I add a message to Azure queue storage that will show up in the queue exactly tomorrow (after 24 h) ?

like image 666
user2818430 Avatar asked Oct 29 '13 12:10

user2818430


1 Answers

If you are using the Storage Client Library, you will be able to use the addMessage overload in CloudQueue that takes the initial visibility delay as an input param.

Specifically, you would have to use the following overload in 2.0:

AddMessage(CloudQueueMessage message, TimeSpan? timeToLive = null, TimeSpan? initialVisibilityDelay = null, QueueRequestOptions options = null, OperationContext operationContext = null)

If you are using version 1.7, you would use the following overload:

public void AddMessage(CloudQueueMessage message, TimeSpan? timeToLive, TimeSpan? initialVisibilityDelay)

You can find more info about Visibility timeout and how it works here.

While the TTL (Time to Live;ie, time until death; not time until live) is not capped (as of version 2017-07-29) the visibilityTimeout "must be larger than or equal to 0, and cannot be larger than 7 days"

like image 189
Veena Udayabhanu - MSFT Avatar answered Oct 14 '22 18:10

Veena Udayabhanu - MSFT