Suppose I want to bulk-send three messages, A
, B
, C
, in that order, to a FIFO SQS queue. I could use the bulk SendMessageBatch
call.
We provide the ordered list [A,B,C]
to the API call.
Suppose that the sends of A
and C
return HTTPCode 200, but B
does not.
Because C
was sent (and delivered) after B
was sent (and not delivered), what happens? Does C
still get enqueued? If I resend B
, or re-issue the bulk send command within the visibility timeout period; and suppose all three messages succeed this time; will the queue read A
, C
, B
?
I am using boto3
as my driver.
More detail from the docs:
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.