RabbitMQ

1 min read index source

RabbitMQ

RabbitMQ is a message broker that implements the Advanced Message Queuing Protocol (AMQP).

Key Concepts

Core Components

  • Producer: Application that sends messages
  • Consumer: Application that receives messages
  • Queue: Buffer that stores messages
  • Exchange: Receives messages from producers and routes them to queues
  • Binding: Relationship between exchange and queue

Exchange Types

  1. Direct: Routes messages based on exact routing key
  2. Topic: Routes messages based on wildcard matching
  3. Fanout: Broadcasts messages to all bound queues
  4. Headers: Routes based on message headers

Common Interview Questions

  1. What is the difference between RabbitMQ and Kafka?
  2. How does message acknowledgment work?
  3. Explain dead letter queues
  4. How to handle message persistence?
  5. What is the purpose of exchanges?
  6. How to implement pub/sub pattern?
  7. Explain message routing strategies
  8. How to handle message ordering?
  9. What are the different QoS levels?
  10. How to implement retry mechanisms?