A message carries information between software services without requiring them to handle it at the same time. In event-driven systems, distinguish a command—which asks for action—from an event, which records a fact. section 7.0
A message may pass through four handoffs:
- Publication: the producer gives the message to a broker and receives confirmation. section 7.4.3
- Enqueue: the broker stores it so it can wait safely for a consumer. section 7.4.3
- Consumption: a consumer retrieves the message, typically locking it while processing. section 7.4.3
- Acknowledgment: after successful processing, the consumer confirms completion; without that confirmation, the broker may retry. section 7.4.3
An order message
The Order Service publishes an OrderPlaced event. The broker stores it, then the Shipping Service consumes it and prints a label. If shipping crashes before acknowledging, the broker can resend the message—so the label might be printed twice. section 7.4.3 section 7.2.3
Figure 7.3 The Broker acts as the buffer. The Producer speaks to the Broker, not the Consumer.

See how a broker buffers messages between producers and consumers. section 7.2.1









