Suggest an editImprove this articleRefine the answer for “What does a message broker (Kafka, RabbitMQ) do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A **message broker** is a component that passes messages between services in a distributed system, making their interaction asynchronous and reliable instead of relying on direct calls. **Key point:** the broker accepts, stores, and delivers messages, providing asynchrony, resilience, and loose coupling between parts of the system.Shown above the full answer for quick recall.Answer (EN)ImageA **message broker** is a component that **passes messages between services** in a distributed system, making their interaction asynchronous and reliable. ### The main idea Services **do not call each other directly**, but exchange messages through a broker: - one service **publishes an event** ("Payment completed"), - another **subscribes** to such events and reacts ("Create a delivery record"). This removes rigid dependencies between services. ### What a message broker does 1. **Accepts and stores messages** acts as a buffer between publishers and consumers. 2. **Delivers messages** guarantees delivery even when the recipient is temporarily unavailable. 3. **Routes streams** sends the message to the right queue or topic. 4. **Supports scaling** distributes the load among several subscribers. 5. **Ensures reliability and order** stores acknowledgments, redelivers lost messages, and preserves the order of events. ### Message broker examples - **RabbitMQ**: a classic queue broker (the AMQP protocol), great for business events and processing tasks. - **Apache Kafka**: a high-performance streaming platform for data streams and event logs. **Summary:** > A message broker is the "mail carrier" between microservices: > it accepts, stores, and delivers messages, > providing **asynchrony, resilience, and loose coupling** between parts of the system.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.