Events, queues, and streams
How can delivery repeat without repeating the business effect?
Slide contents
1. Events, queues, and streams
How can delivery repeat without repeating the business effect?
2. Delivery repeats; business intent does not
One event keeps its identity across attempts.
3. Storage, delivery, effect and ACK are separate events
Each stage has its own acknowledgment.
4. Acknowledgments answer different questions
Publisher ACK and consumer ACK are not interchangeable.
5. Republishing is allowed; deduplication absorbs it
Uncertainty preserves the possibility of retry.
6. Log order is not completion order
Parallel workers change observed completion order.
7. Work distribution needs an explicit limit
In-flight messages occupy resources.
8. Retention defines the replay window
A queue is not an infinite history.
9. Consumer position does not store the business result
Broker progress and etcd state are distinct.
10. An early ACK can lose task work
A crash after acknowledgment leaves no result.
11. A late ACK makes redelivery normal
The result exists while acknowledgment is uncertain.
12. A deduplication key identifies a logical action
It survives restarts and redelivery.
13. The effect and its memory commit together
An etcd Txn combines four writes.
14. Concurrent duplicates meet at one atomic check
Only one success branch creates the effect.
15. ACK follows a confirmed local outcome
Read state first when commit is uncertain.
16. A duplicate reads the existing result
Code runs again while the effect record remains one.
17. An external effect needs another protocol
A payment cannot be included in a local etcd Txn.
18. Entity ordering is expressed in its state
An event must match the expected transition.
19. Parallelism requires valid reorderings
Independence depends on effects, not timestamps.
20. Replay needs its own purpose
Reapplying effects differs from rebuilding a projection.
21. Deleting memory narrows the retry guarantee
Dedup retention must match possible replay.
22. An unprocessable task needs an explicit outcome
Retrying forever is not recovery.
23. Backlog connects arrival and processing capacity
If arrivals exceed completion, backlog grows.
24. Recover a worker after a crash and race
Delete dedup after one day with seven-day replay? Check both the result and its memory.
Trace commit before ACK
Account for concurrent redelivery
Examine dedup deletion
25. Safe retries close the entire chain
Every boundary has a durable continuation.
26. After this lecture, you can
Separate storage, delivery, execution and ACK.
Build an atomic event handler with deduplication.
Justify processing order and dedup retention.