This chapter is an outline. The curriculum, learning objectives and
structure are settled; the prose, diagrams and code are still being written.
What is below is the plan for the chapter, not the chapter.
Lab 10 — Spring Boot producer and consumer
Goal
SqsTemplate and @SqsListener end to end — and what Spring is doing underneath.
Setup
To be written — CLI commands and an IaC equivalent for every resource, all prefixed sqs-course-.
Steps
- Create a Spring Boot 3 project with the Spring Cloud AWS SQS starter
- Send with
SqsTemplate - Consume with
@SqsListener,acknowledgementMode = ON_SUCCESS - Throw from the handler; watch the message return via SQS
- Add
@Retryableto the handler; watchApproximateReceiveCountstay at 1 - Switch to
acknowledgementMode = ALWAYS; watch a failing message vanish - Set concurrency and observe parallel invocation
What you should observe
- In-process retry never touches SQS — the receive count does not move and the DLQ never fires
ALWAYSacknowledgement is silent data loss- Acknowledgement is just
DeleteMessage
Why it happened
To be written — ties each observation back to the mechanism in 23 — SQS with Java and Spring Boot.
Experiments to try
To be written — deliberate variations that change the outcome.
Teardown
To be written — every resource created above, in dependency order.
← Back to: 29 — Hands-on Labs