Idempotent consumer
A consumer that can receive the same event any number of times and apply its effect once. Here a processed_events row keyed by event_id is inserted in the same transaction as the side effect, so a redelivery finds it and does nothing.
Minimal example
INSERT IGNORE INTO processed_events (event_id) VALUES (?);
-- 0 rows affected: already processedLearn this concept
Lesson 3.16 · Idempotency and retry handlingUsed in exercises
Exercise 3.17 · Notifier worker with retries and DLQ Exercise 3.23 · Concurrent outbox relayRelatedDead-letter queue