Data consumers

If you've worked with RabbitMQ or other queuing systems, you can be used to registering workers on specific queues or topics where those listeners/workers get notified when messages of interest arrive. With SQS, the model is entirely different. SQS is a purely poll-based system; that is, any code that is interested in reading data from a queue needs to poll using the appropriate AWS APIs. Additionally, application code must explicitly delete messages from the queue once it has completed its processing.

Some APIs for other queuing systems will automatically ack a message provided no exception occurs, resulting in the removal of those message from the queue. It's imperative to remember to delete messages from an SQS queue even ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.