Learning/AWS SQS/29 — Hands-on Labs/Lab 02 — Send and receive a message
Beginner 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 02 — Send and receive a message

Goal

The three-call round trip, and the difference between MessageId and ReceiptHandle.

Setup

To be written — CLI commands and an IaC equivalent for every resource, all prefixed sqs-course-.

Steps

  1. Send a message; record the returned MessageId
  2. Receive it; record the ReceiptHandle
  3. Receive again without deleting — observe the message is not returned (it is in flight)
  4. Wait out the visibility timeout; receive again
  5. Compare the two ReceiptHandle values for the same MessageId
  6. Delete with the latest handle; try deleting with the stale one

What you should observe

  • One MessageId, a new ReceiptHandle on every receive
  • A stale receipt handle does not delete the message
  • Receiving is not removing

Why it happened

To be written — ties each observation back to the mechanism in 04 — Sending and Receiving Messages.

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