PUT on MessageQueue

The PUT action on a MessageQueue endpoint does one of two things:

To send a message, you must append the static message ID back to the queue URL (see the example below). The message is sent to the back of the queue, as messages are read from the front of the queue. You specify the content of the message in the Message parameter, and the content can be any string. The total string length of Message cannot exceed 256K.

To set the visibility timeout, you must include the VisibilityTimeout parameter, but you must not append the static message ID back to the queue URL. If you do, the request will succeed, but the visibility timeout will not be set.

PUT requests on a MessageQueue are validated on the following:

This action, if successful, returns Success. If you sent a message to the queue, the action also returns 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
MessageA string representing the body of the message to send. The total string length of all the message bodies cannot exceed 256K. Make sure to append the static message ID back to the URL when sending a message.Required when sending a messageString from 1 byte to 256k
VisibilityTimeoutThe duration, in seconds, that messages are hidden from subsequent GET on MessageQueue requests. See SetVisibilityTimeout for more information. Do not append the static message ID back to the URL when setting the visibility timeout.Required when setting the visibility timeoutInteger from 0 to 86400 seconds (maximum 24 hours)

The following examples show how to send messages to the queue and how to set the visibility timeout.

ErrorDescription
MissingParameterNo value for Message was supplied.
InvalidURIThe URL for the queue is not valid or was not a URL returned by a POST or GET on QueueService request.
AWS.SimpleQueueService.NonExistentQueueQueue does not exist.