What is Message Queue?

Turkish: Mesaj Kuyruğu

A message queue buffers work between services so producers and consumers can run asynchronously and recover from traffic spikes.

What is a Message Queue?

A message queue is a reliable buffer placed between systems so one service can produce work and another can process it later. After an order is placed, tasks such as sending email, creating an invoice, or generating a report can be queued without slowing down the user-facing request.

How Does It Work?

A producer writes a message to the queue. The broker stores it and delivers it to an available consumer. When processing succeeds, the consumer acknowledges the message. If processing fails, the message can be retried or moved to a dead-letter queue. This protects systems during traffic spikes, but idempotent processing and ordering requirements must be designed deliberately.

Tools and Use Cases

RabbitMQ is common for task queues and routing flexibility, while Kafka is often used for high-volume event streams and durable logs. E-commerce orders, notifications, image processing, data synchronization, and background reporting are typical examples.

In event-driven architectures, message queues let services react to events without being tightly coupled to one another.