How aws-developers-learning/sqs-sample works
Main Components
• Producer Application:
• Represented as a Spring Boot microservice.
• Contains a REST controller (e.g., SqsController) that listens for POST requests on the “/send” endpoint.
• Uses a service (SqsSenderMessage) to send messages to the SQS queue.
• Has its own configuration (SqsConfig) defined in its package.
• AWS SQS Queue:
• Central message broker.
• Acts as the middleman that receives messages from the producer and delivers them to the listener.
• Listener Application:
• Represented as another Spring Boot microservice.
• Contains a listener component (SqsReceiverMessage) responsible for polling the SQS queue.
• Logs/handles the incoming messages upon reception.
• External Interaction (Optional):
• Client or API testing tool (e.g., Postman or HTTPie) that sends a POST request to the producer.
Relationships and Interactions
• The client sends a POST request to the Producer Application’s endpoint (/send) with a message payload.
• The Producer Application uses its SqsSenderMessage service to push the message into the SQS queue (configured via SqsConfig).
• The SQS queue temporarily stores the message.
• The Listener Application actively polls or gets notified from the SQS queue.
• Upon receiving the message, the Listener (using SqsReceiverMessage) processes/logs the message.
Architectural Patterns and Design Principles
• Messaging/Asynchronous Communication: Highlight the use of AWS SQS as an asynchronous broker to decouple the producer from the consumer.
• Microservices Separation: Each application (producer and listener) is an independent Spring Boot service.
• Cloud Integration: The design includes integration with AWS services (access keys, SQS queue creation, AWS SDK usage as noted in the README).
Relevant Technologies, Frameworks, and Libraries
• Spring Boot (for creating both the Producer and Listener applications)
• AWS SDK / Spring Cloud AWS (for integration with AWS SQS)
• Maven (pom.xml files indicate the build tool and dependency management)
• AWS SQS (as the messaging broker)