Search code examples
amazon-web-servicesamazon-sqsaws-sqs-fifo

SQS SendMessageBatch Concurrency Limit


What is the maximum concurrency limit on SQS FIFO Queue? If I call 200 sendMessageBatch APIs with 10 messages(< 256KB) per API invocation. Will SQS be able to handle this?

Sample Code:

   const totalSqsBatches = 200;
   const sqsPromises = [];

   for (let batch = 0; batch < totalSqsBatches; batch++) {
     sqsPromises.push(
       sqs.sendMessageBatch({
         Entries: sqsEntries.slice(batch, (batch + 1) * 10),
         QueueUrl: URL,
       })
     );
   }

  await Promise.all(sqsPromises).catch(err => console.error(err)

Solution

  • Yes, it will.

    If you use batching, FIFO queues support up to 3,000 messages per second, per API method (SendMessageBatch, ReceiveMessage, or DeleteMessageBatch). The 3000 messages per second represent 300 API calls, each with a batch of 10 messages.

    This means you can invoke 200 times sendMessageBatch API. Also, 300 API calls is a soft limit and can be increased by contacting AWS support.

    Besides that, there is High throughput for FIFO queues. You can go up to 3,000 API calls, each with a batch of 10 messages.

    Source