Is it possible to change the invisibility timeout of an Azure Queue message without sending data?

With the 1.6 SDK (version 2011-08-18) you can change the invisibility timeout of a queue message. However, when reading the REST documentation, it would seem that you should send the message back. I understand that the operation is intended to update the entire message (including the invisibility timeout), but I only want to change the invisibility timeout without resending the entire message. Is it possible?

Thanks Erick

+4
source share
2 answers

Update the queue message with the settings for the MessageUpdateFields.Visibility flag, regardless of the value of the message content. eg

message.SetMessageContent(""); queue.UpdateMessage(message, visibilityTimeout, MessageUpdateFields.Visibility); 

this will not change the content of the message to an empty line, and the content will remain untouched and will only update the visibility timeout.

To refresh the content, as well as the timeout for visibility,

 queue.UpdateMessage(message, visibilityTimeout, MessageUpdateFields.Content | MessageUpdateFields.Visibility); 
+14
source

The update message has timeout update options. More information can be found here http://msdn.microsoft.com/en-us/library/windowsazure/hh452234.aspx

0
source

Source: https://habr.com/ru/post/1394680/


All Articles