SendMessage

The SendMessage action delivers a message to the specified queue.

For SOAP requests, you must provide the message text in the MessageBody parameter. The size of the message cannot exceed 256 KB.

For Query requests, you can provide the message text in one of two ways:

[Important]Important

The following list shows the characters (in Unicode) allowed in your message (according to http://www.w3.org/TR/REC-xml/#charsets). If you send any characters not included in the list, your request will be rejected.

#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

The following table lists the special request parameters the action uses (in addition to the common request parameters listed in Common Request Parameters).

NameDescriptionRequired

MessageBody

The message to send.

Type: URL-encoded string maximum 8 KB in size (for Query requests); string maximum 256 KB in size (for SOAP requests). See the important note above for a list of allowed characters.

Condition: Required for Query requests using the GET method and for all SOAP requests.

Conditional

The following table lists the response elements the action returns (in addition to the common response elements listed in The Structure of a Response).

NameDescription

MessageId

An element containing the message ID of the message sent to the queue. You use this value when performing actions on the message.

Ancestor: SendMessageResponse

The following table lists the special errors the action returns (in addition to the common errors listed in Common Errors).

ErrorDescriptionHTTP Status Code

InvalidMessageContents

The message contains characters outside the allowed set.

400