SendMessage (Query)

The SendMessage action delivers a message to the specified queue. The content of the message is specified in the MessageBody parameter and can be any text. However, the message body text must be URL-encoded.

Important:

The total string length of MessageBody cannot exceed 8K. Use SOAP or REST to send messages as large as 256K.

SendMessage requests are validated on the following:

Returns Success and a string representing the ID of the message sent, which you use as the value of the MessageId parameter when performing actions on that message. This action returns an error response if unsuccessful.

NameDescriptionTypeValue
MessageBodyRequired. A string representing the body of the message to send. The total string length of the message body cannot exceed 8K.StringThe content of the message. The message can contain any valid string character, but must be URL-encoded so that the string does not contain any characters that would not be valid in an HTTP URL.

The following example SendMessage request sends a message containing "Your Message Text" as the body of the message to the specified queue.

ErrorDescription
MissingParameterNo value for MessageBody was supplied.
InvalidURIThe URL for the queue is not valid or was not a URL returned by a CreateQueue or ListQueues request.
AWS.SimpleQueueService.NonExistentQueueQueue does not exist.