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.
Related Terms
A dead letter queue separates messages that cannot be processed so teams can inspect errors, retry safely, and avoid data loss.
Deque (Double-Ended Queue)A deque is a double-ended queue that allows efficient insertion and removal at both the front and back of a collection.
Event-Driven ArchitectureEvent-driven architecture lets systems react through independent components when events such as orders, payments, or stock changes occur.
Apache KafkaApache Kafka is a distributed log-based messaging platform designed for processing high-volume real-time data streams.
Message BrokerA message broker queues and routes events or tasks between services, decoupling producers from consumers in distributed systems.
Microservice CommunicationMicroservice communication is how independent services exchange data and commands through REST, gRPC, events, or message queues.
RabbitMQRabbitMQ is a message broker that routes messages between producer and consumer applications through AMQP queues and exchanges.