Module Smaws_Client_SQS.SendMessageBatch

val request : Smaws_Lib.Context.t -> send_message_batch_request -> (send_message_batch_result, [> Smaws_Lib.Protocols.AwsJson.error | `BatchEntryIdsNotDistinct of batch_entry_ids_not_distinct | `BatchRequestTooLong of batch_request_too_long | `EmptyBatchRequest of empty_batch_request | `InvalidAddress of invalid_address | `InvalidBatchEntryId of invalid_batch_entry_id | `InvalidSecurity of invalid_security | `KmsAccessDenied of kms_access_denied | `KmsDisabled of kms_disabled | `KmsInvalidKeyUsage of kms_invalid_key_usage | `KmsInvalidState of kms_invalid_state | `KmsNotFound of kms_not_found | `KmsOptInRequired of kms_opt_in_required | `KmsThrottled of kms_throttled | `QueueDoesNotExist of queue_does_not_exist | `RequestThrottled of request_throttled | `TooManyEntriesInBatchRequest of too_many_entries_in_batch_request | `UnsupportedOperation of unsupported_operation ]) Stdlib.result

You can use SendMessageBatch to send up to 10 messages to the specified queue by assigning either identical or different values to each message (or by not assigning values at all). This is a batch version of

[SendMessage].

For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent.

The result of sending each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144 bytes).

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed. For more information, see the W3C specification for characters.

#x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF

Amazon SQS does not throw an exception or completely reject the message if it contains invalid characters. Instead, it replaces those invalid characters with U+FFFD before storing the message in the queue, as long as the message body contains at least one valid character.

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses the default value for the queue.