Learning/AWS SQS/29 — Hands-on Labs/Lab 10 — Spring Boot producer and consumer
Advanced outline
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

  1. Create a Spring Boot 3 project with the Spring Cloud AWS SQS starter
  2. Send with SqsTemplate
  3. Consume with @SqsListener, acknowledgementMode = ON_SUCCESS
  4. Throw from the handler; watch the message return via SQS
  5. Add @Retryable to the handler; watch ApproximateReceiveCount stay at 1
  6. Switch to acknowledgementMode = ALWAYS; watch a failing message vanish
  7. 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
  • ALWAYS acknowledgement 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