Moving from a standard queue to a FIFO queue in Amazon SQS (original) (raw)

If your existing application uses standard queues and you want to take advantage of the ordering or exactly-once processing features of FIFO queues, you need to configure both the queue and your application correctly.

Key considerations
Checklist for moving to FIFO queues

Before sending messages to a FIFO queue, confirm the following:

  1. Configure delay settings
    • Modify your application to remove per-message delays.
    • Set the DelaySeconds parameter on the entire queue.
  2. Set message group IDs
    • Organize messages into message groups by specifying a message group ID based on a business dimension.
    • Use more granular business dimensions to improve scalability.
  3. Handle message deduplication
    • If your application can't send messages with identical message bodies, provide a unique message deduplication ID for each message.
    • If your application sends messages with unique message bodies, enable content-based deduplication.
  4. Configure the consumer
    • Generally, no code changes are needed for the consumer.
    • If processing messages takes a long time and the visibility timeout is set high, consider adding a receive request attempt ID to eachReceiveMessage action. This helps retry receive attempts in case of networking failures and prevents queues from pausing due to failed receive attempts.

By following these steps, you can ensure your application works correctly with FIFO queues, taking full advantage of their ordering and exactly-once processing features. For more detailed information, see the Amazon Simple Queue Service API Reference.

Exactly-once processing

FIFO queue and Lambda concurrency behavior

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.