Systems & Backend

Message Broker

Middleware that receives, buffers, and routes messages between producers and consumers.

A message broker is infrastructure that sits between services, accepting messages from producers and delivering them to consumers, so the two never talk directly. It decouples them in time and space: producers keep running when consumers are down, load spikes are absorbed by the queue, and multiple consumers can share or fan out the work. Kafka, RabbitMQ, and cloud queues are common examples.

Worked example: a checkout service drops an "order placed" message onto a broker and returns immediately; the email, inventory, and analytics services each consume it on their own schedule, so a slow email provider never blocks checkout. Gotcha: a broker moves failure from "call failed now" to "message stuck later" — you inherit new concerns like delivery guarantees (at-least-once vs exactly-once), ordering, poison messages, and dead-letter queues, so the decoupling is real but not free.