Learning path

Full curriculum

Full curriculum

Arrows go from each prerequisite to the units that depend on it. Hover or focus a unit to highlight its path.

Unit content

Message queues and publish-subscribe systems

A message broker decouples producers from consumers by storing or forwarding messages between them.

In a queue, messages are consumed as work items, commonly so each message is handled by one worker from a group.

In publish-subscribe, a producer publishes to a topic and several independent subscribers can receive the event.

Brokers can buffer bursts and let producers continue even when consumers are temporarily slower, but the system must still define acknowledgement, retention and redelivery behavior.

A consumer can fail after performing an external effect but before acknowledging the message, causing redelivery. Delivery semantics and idempotent processing therefore remain relevant even when a broker is durable.

Queues and pub-sub organize communication patterns; they do not eliminate distributed failure.