Message Passing - Junior¶
A producer sends a value; a consumer owns and processes it. They do not edit one shared object.
sequenceDiagram
participant P as CDC reader
participant Q as Queue
participant W as Writer
P->>Q: Change event
Q->>W: Change event
W->>W: Update owned batch
This separation simplifies reasoning, but a fast Debezium source can still fill an unbounded queue. Start with an immutable message, a bounded queue, one clear owner after send, and a defined action when full.
Continue to middle.md.
Test yourself¶
- How does message passing reduce shared-state races?
- What happens when the consumer is slower than the producer?
- Who owns a message after it is sent?