다음을 통해 공유


QueueClient.UpdateMessageAsync Method

Definition

Overloads

UpdateMessageAsync(String, String, BinaryData, TimeSpan, CancellationToken)

Changes a message's visibility timeout and contents.

A message must be in a format that can be included in an XML request with UTF-8 encoding. Otherwise MessageEncoding option can be set to Base64 to handle non compliant messages. The encoded message can be up to 64 KiB in size for versions 2011-08-18 and newer, or 8 KiB in size for previous versions.

For more information, see Update Message.

UpdateMessageAsync(String, String, String, TimeSpan, CancellationToken)

Changes a message's visibility timeout and contents.

A message must be in a format that can be included in an XML request with UTF-8 encoding. Otherwise MessageEncoding option can be set to Base64 to handle non compliant messages. The encoded message can be up to 64 KiB in size for versions 2011-08-18 and newer, or 8 KiB in size for previous versions.

For more information, see Update Message.

UpdateMessageAsync(String, String, BinaryData, TimeSpan, CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Changes a message's visibility timeout and contents.

A message must be in a format that can be included in an XML request with UTF-8 encoding. Otherwise MessageEncoding option can be set to Base64 to handle non compliant messages. The encoded message can be up to 64 KiB in size for versions 2011-08-18 and newer, or 8 KiB in size for previous versions.

For more information, see Update Message.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.UpdateReceipt>> UpdateMessageAsync (string messageId, string popReceipt, BinaryData message, TimeSpan visibilityTimeout = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateMessageAsync : string * string * BinaryData * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.UpdateReceipt>>
override this.UpdateMessageAsync : string * string * BinaryData * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.UpdateReceipt>>
Public Overridable Function UpdateMessageAsync (messageId As String, popReceipt As String, message As BinaryData, Optional visibilityTimeout As TimeSpan = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UpdateReceipt))

Parameters

messageId
String

ID of the message to update.

popReceipt
String

Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation.

message
BinaryData

Optional. Updated message.

visibilityTimeout
TimeSpan

Required. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. A message can be updated until it has been deleted or has expired.

cancellationToken
CancellationToken

Optional CancellationToken.

Returns

Response<T>.

Remarks

This version of library does not encode message by default. Base64 was the default behavior in the prior v11 library. See CloudQueue.EncodeMessage.

Applies to

UpdateMessageAsync(String, String, String, TimeSpan, CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Changes a message's visibility timeout and contents.

A message must be in a format that can be included in an XML request with UTF-8 encoding. Otherwise MessageEncoding option can be set to Base64 to handle non compliant messages. The encoded message can be up to 64 KiB in size for versions 2011-08-18 and newer, or 8 KiB in size for previous versions.

For more information, see Update Message.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.UpdateReceipt>> UpdateMessageAsync (string messageId, string popReceipt, string messageText = default, TimeSpan visibilityTimeout = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateMessageAsync : string * string * string * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.UpdateReceipt>>
override this.UpdateMessageAsync : string * string * string * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.UpdateReceipt>>
Public Overridable Function UpdateMessageAsync (messageId As String, popReceipt As String, Optional messageText As String = Nothing, Optional visibilityTimeout As TimeSpan = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UpdateReceipt))

Parameters

messageId
String

ID of the message to update.

popReceipt
String

Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation.

messageText
String

Optional. Updated message text.

visibilityTimeout
TimeSpan

Required. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. A message can be updated until it has been deleted or has expired.

cancellationToken
CancellationToken

Optional CancellationToken.

Returns

Response<T>.

Remarks

This version of library does not encode message by default. Base64 was the default behavior in the prior v11 library. See CloudQueue.EncodeMessage.

Applies to