4

With the 1.6 SDK (Version 2011-08-18) you can change the invisibility timeout of a queue message. However, reading the REST documentation, it would seem to show that you have to post back the message. I understand that the operation is meant to update the entire message (including invisibility timeout), but I only want to change the invisibility timeout without having to resend the entire message. Is this possible?

Thanks, Erick

Erick T
  • 7,009
  • 9
  • 50
  • 85

2 Answers2

16

Update the Queue Message with Flag Settings MessageUpdateFields.Visibility regardless of the value of Message contents. e.g.

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

this will not change the message contents to Empty string and contents will remain intact and would update the Visibility timeout only.

To update the contents as well as visibility timeout,

queue.UpdateMessage(message, visibilityTimeout, MessageUpdateFields.Content | MessageUpdateFields.Visibility);
Jash
  • 736
  • 6
  • 9
-1

Update message has capabilities of updating the timeout. More details can be found here http://msdn.microsoft.com/en-us/library/windowsazure/hh452234.aspx

Deepak
  • 2,223
  • 17
  • 15
  • Deepak - the text that lead me to believe that you need to repost the data is "The body of the request contains the message data in the following XML format. Note that the message content must be in a format that may be encoded with UTF-8." (under the request body header). The question is - is this optional, or do I need to repost the data? – Erick T Feb 04 '12 at 06:05