What is Message Broker?
Turkish: Mesaj Aracısı (Message Broker)
A message broker queues and routes events or tasks between services, decoupling producers from consumers in distributed systems.
What is Message Broker?
A message broker receives messages from one service, stores or routes them, and delivers them to other services through an intermediate layer. This decouples producers from consumers, so both sides do not need to be online or equally fast at the same time.
How It Works
A producer sends an event or task to the broker. The broker keeps it in a queue, topic, or exchange. Consumer services pull or receive messages at their own pace, process them, and acknowledge success. Failed messages may be retried or moved to a dead-letter queue for inspection.
Common Models
- Task queue: Background work such as email sending, report generation, or image processing is queued.
- Event stream: Events such as order created, payment captured, or stock changed are stored as an append-only stream.
- Pub/Sub: One event is distributed to multiple subscribers.
RabbitMQ is often used for classic queueing and routing patterns, while Kafka is used for high-volume event streams. A message queue describes the queue itself; a message broker covers routing, delivery guarantees, consumer coordination, and operational behavior around it.
In e-commerce, ERP integration, notification infrastructure, and microservice communication, the choice between Kafka and RabbitMQ depends on message volume, latency expectations, retention needs, and replay requirements.
Related Terms
Apache Kafka is a distributed log-based messaging platform designed for processing high-volume real-time data streams.
Message QueueA message queue buffers work between services so producers and consumers can run asynchronously and recover from traffic spikes.
Publish-Subscribe (Pub/Sub)Publish-subscribe is a messaging pattern where publishers send events to topics and subscribers receive matching messages.
RabbitMQRabbitMQ is a message broker that routes messages between producer and consumer applications through AMQP queues and exchanges.