Summary
Ensure that any message added to the database is also added to the queue, and delete any message from the DB if not successfully queued (and vice versa).
Details
- Guarantee that a message is both persisted and enqueued, or neither
- Implement transactional logic or other mechanisms to ensure consistency between DB and queue
- If a failure occurs during queueing, remove the message from the DB
- If a failure occurs during DB write, do not add to queue
- Add monitoring/logging for these operations
Motivation
Prevents orphaned messages and ensures reliable delivery pipeline integrity.
Summary
Ensure that any message added to the database is also added to the queue, and delete any message from the DB if not successfully queued (and vice versa).
Details
Motivation
Prevents orphaned messages and ensures reliable delivery pipeline integrity.