Communication

Messages that keep their meaning across teams and systems.

Message design

Give every event a clear envelope

An event needs more than a payload. Its identity, origin and creation time let a receiver interpret it without guessing which application produced it. Keep these shared fields separate from the business data so that transport changes do not alter their meaning.

Message design
Change a message without surprising its readers

Producers and consumers rarely upgrade at the same instant. A schema change therefore has a transition period in which old and new messages coexist. Design that period explicitly instead of treating deployment as an atomic event across the organisation.

Message design
Follow one interaction across boundaries

A customer action may create several requests, background jobs and notifications. A correlation identifier connects the records of that interaction. It is useful context, but it is not an authentication token and should never grant access on its own.

Message design
Say which clock a timestamp describes

Arrival order is not necessarily event order. Devices can disconnect, clocks can drift and queues can delay publication. A timestamp without a defined meaning encourages readers to combine measurements that describe different moments in a process.

Message design
Make errors useful to the receiving system

An error response should help a caller decide what to do next. Human-readable explanation and machine-readable classification serve different purposes. Keep a stable error code even when the wording changes for clarity or translation.

Message design

Delivery

Retry a request without repeating its effect

A caller can lose the response after a server has already completed an operation. Retrying is then ambiguous: the first attempt may have succeeded. Idempotency gives repeated attempts a defined relationship instead of leaving duplicates to later cleanup.

Delivery
Give a recovering service room to recover

Retries can amplify an outage when every client sends another request at the same instant. Backoff spreads attempts over time. It belongs with a maximum retry budget, otherwise a failed operation can occupy resources long after it remains useful.

Delivery
Define what an acknowledgement promises

Accepted, stored, processed and delivered describe different states. A positive acknowledgement is only useful when both sides agree which state it confirms. Confusing receipt with completion can make a dashboard look successful while work is still pending.

Delivery
Keep failed messages available for diagnosis

A repeatedly failing message should not prevent unrelated work from progressing. A dead-letter queue separates persistent failures from the normal flow while retaining enough information to understand them. It is a work queue for recovery, not permanent storage.

Delivery
Let a slow consumer signal its limits

If producers can send work faster than consumers can finish it, a queue keeps growing. Backpressure makes the imbalance visible and limits incoming work. Extra buffering may absorb a short burst, but it cannot solve sustained overload.

Delivery

Search the library