Messaging & Event Streaming

A request/response API couples two systems in time: the caller waits, and if the callee is slow or down, the caller suffers. Messaging breaks that coupling. A producer writes a message and moves on; a consumer processes it when it can. That one change unlocks retries, load leveling, fan-out to many consumers, and replaying history.

It also introduces new problems — duplicate delivery, ordering, poison messages, and "where did my event go?" debugging. This hub covers the tools and the patterns that keep asynchronous systems correct.

TL;DR

Queue vs Log vs Workflow

Featured Topics

Foundations

Brokers

Streams & Workflows

A Typical Event Pipeline

The application writes only to its database. CDC turns committed changes into events, so there's no dual-write race. Each downstream team reads the same topic with its own consumer group and its own pace.

Common Mistakes

🚫 Assuming exactly-once — Brokers can redeliver after a crash or rebalance. Deduplicate in the consumer.

🚫 Dual writes — Writing to the database and then publishing to Kafka loses events when the second step fails. Use an outbox table or CDC.

🚫 No dead-letter queue — One malformed message blocks the partition forever.

🚫 Ignoring consumer lag — Lag is the leading indicator that you're about to miss an SLA. Alert on it.

🚫 Kafka for a to-do list — A simple job queue is often all you need. Don't run a distributed log for ten jobs a minute.

Learning Path

Beginner

Add a background job queue to a web app and make the job idempotent.

Intermediate

Run RabbitMQ or Kafka locally, build producers and consumer groups, and add retries and a DLQ.

Advanced

Build a CDC pipeline into a stream processor, and model a multi-step business process with durable execution.

Related Topics