liveBook · Manning

Acknowledgment

As explained in Grokking Software Architecture

An acknowledgment is a protocol signal indicating that a message or event has been successfully received or processed.

In a brokered event flow, an acknowledgment (ACK) is a signal confirming receipt or successful processing. Keep two handoffs distinct: the producer receives an ACK from the broker, while the consumer sends an ACK after finishing the job. section 7.4.3

The consumer’s ACK determines what happens next:

  • After successful processing, the consumer ACKs the broker, which can then remove the message. section 7.4.3
  • If the consumer crashes before ACKing, the broker treats the job as failed and makes the message available to try again. section 7.4.3
  • That retry supports at-least-once delivery, but can cause duplicate processing if the job finished before the crash. section 7.4.3

The second shipping label

A shipping service prints a label, then crashes before sending its ACK. The broker retries the message, so the service may print another label. Idempotency is the planned fix for this duplicate-work risk. section 7.4.3

How Grokking Software Architecture covers it

How deep it goes
Traces producer and consumer ACKs, crash retries, and duplicate processing, while deferring idempotency as the fix.
Examples
Uses a shipping service that prints a label, crashes before ACKing, and may print a duplicate after retry.
What you can do after
Understand how ACK timing affects message retries and the risk of duplicate work.
How it connects
Connects acknowledgments to message brokers, at-least-once delivery, resilience, and idempotency.

Also explained in

Compare how 5 books explain acknowledgment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.