What is a message queue?
A message queue is middleware that enables asynchronous communication between services. Producers send messages to a queue; consumers process them independently, decoupling services.
What are the benefits of message queues?
Benefits include: asynchronous processing, load leveling, fault tolerance, scalability, service decoupling, and ability to handle traffic spikes without overloading services.
What is the difference between a queue and a topic?
Queue: point-to-point communication, one consumer processes each message. Topic (pub/sub): broadcast communication, multiple subscribers receive each message.
What is Apache Kafka?
Kafka is a distributed streaming platform for building real-time data pipelines. It uses a publish-subscribe model with high throughput, durability, and message replay capability.
What is RabbitMQ?
RabbitMQ is a message broker implementing AMQP protocol. It supports multiple messaging patterns (queue, pub/sub, routing), offers reliability features, and has flexible routing.
What is message acknowledgment?
Acknowledgment confirms a message has been successfully processed. It ensures reliability: if consumer fails before acking, the message is redelivered to another consumer.
What is idempotency in message processing?
Idempotency means processing the same message multiple times produces the same result. It’s crucial for handling duplicate messages and ensuring system reliability.
What is a dead letter queue?
A dead letter queue stores messages that couldn’t be processed after multiple attempts. It prevents message loss and allows investigation of problematic messages.
What is event-driven architecture?
Event-driven architecture uses events (state changes) to trigger and communicate between services. Services emit events when something happens; other services react by consuming events.
What is backpressure?
Backpressure is a mechanism to handle situations where consumers can’t keep up with producers. It slows down producers or buffers messages to prevent system overload.