Make a consumer idempotent so a redelivery stops causing a second effect
A consumer that charges twice when a message is redelivered, made safe to receive the same message again.
The ticket
Make one queue consumer idempotent under redelivery.
Acceptance criteria
- Delivering the same message twice produces one effect
- The deduplication key is derived from the message, not from arrival time
- A test replays a message and asserts a single effect
- Deduplication records expire on a stated schedule
What lands as proof
A replay test asserting one effect from two deliveries, which is the entire guarantee.
Why teams defer it
- At-least-once delivery is in the documentation and out of mind until a duplicate reaches a customer.
- Choosing the deduplication key needs somebody who knows what makes a message logically the same.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: make one queue consumer idempotent under redelivery. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.
- How do I know the work is done?
- The pull request carries the evidence, not only the diff. Here that means replay test proving one effect from two deliveries, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.