共用方式為


QueueClient.SendMessage Method

Definition

Overloads

SendMessage(String, Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken)

Adds a new message to the back of a queue. The visibility timeout specifies how long the message should be invisible to Dequeue and Peek operations.

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 Put Message.

SendMessage(BinaryData, Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken)

Adds a new message to the back of a queue. The visibility timeout specifies how long the message should be invisible to Dequeue and Peek operations.

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 Put Message.

SendMessage(String, CancellationToken)

Adds a new message to the back of a queue.

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 Put Message.

SendMessage(String)

Adds a new message to the back of a queue.

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 Put Message.

SendMessage(String, Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Adds a new message to the back of a queue. The visibility timeout specifies how long the message should be invisible to Dequeue and Peek operations.

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 Put Message.

public virtual Azure.Response<Azure.Storage.Queues.Models.SendReceipt> SendMessage (string messageText, TimeSpan? visibilityTimeout = default, TimeSpan? timeToLive = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessage : string * Nullable<TimeSpan> * Nullable<TimeSpan> * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
override this.SendMessage : string * Nullable<TimeSpan> * Nullable<TimeSpan> * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
Public Overridable Function SendMessage (messageText As String, Optional visibilityTimeout As Nullable(Of TimeSpan) = Nothing, Optional timeToLive As Nullable(Of TimeSpan) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SendReceipt)

Parameters

messageText
String

Message text.

visibilityTimeout
Nullable<TimeSpan>

Visibility timeout. Optional with a default value of 0. Cannot be larger than 7 days.

timeToLive
Nullable<TimeSpan>

Optional. Specifies the time-to-live interval for the message

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

SendMessage(BinaryData, Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Adds a new message to the back of a queue. The visibility timeout specifies how long the message should be invisible to Dequeue and Peek operations.

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 Put Message.

public virtual Azure.Response<Azure.Storage.Queues.Models.SendReceipt> SendMessage (BinaryData message, TimeSpan? visibilityTimeout = default, TimeSpan? timeToLive = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessage : BinaryData * Nullable<TimeSpan> * Nullable<TimeSpan> * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
override this.SendMessage : BinaryData * Nullable<TimeSpan> * Nullable<TimeSpan> * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
Public Overridable Function SendMessage (message As BinaryData, Optional visibilityTimeout As Nullable(Of TimeSpan) = Nothing, Optional timeToLive As Nullable(Of TimeSpan) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SendReceipt)

Parameters

message
BinaryData

Message.

visibilityTimeout
Nullable<TimeSpan>

Visibility timeout. Optional with a default value of 0. Cannot be larger than 7 days.

timeToLive
Nullable<TimeSpan>

Optional. Specifies the time-to-live interval for the message

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

SendMessage(String, CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Adds a new message to the back of a queue.

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 Put Message.

public virtual Azure.Response<Azure.Storage.Queues.Models.SendReceipt> SendMessage (string messageText, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessage : string * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
override this.SendMessage : string * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
Public Overridable Function SendMessage (messageText As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SendReceipt)

Parameters

messageText
String

Message text.

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

SendMessage(String)

Source:
QueueClient.cs
Source:
QueueClient.cs

Adds a new message to the back of a queue.

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 Put Message.

public virtual Azure.Response<Azure.Storage.Queues.Models.SendReceipt> SendMessage (string messageText);
abstract member SendMessage : string -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
override this.SendMessage : string -> Azure.Response<Azure.Storage.Queues.Models.SendReceipt>
Public Overridable Function SendMessage (messageText As String) As Response(Of SendReceipt)

Parameters

messageText
String

Message text.

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