SlideShare a Scribd company logo
9
Most read
12
Most read
16
Most read
RabbitMQ interview Questions and Answers
What is RabbitMQ?
RabbitMQ is an open-source message-broker
software is also known as message queueing
technology. It defines queues to which
applications communicate for data transfer, or
message transmission. Any kind of information
could be included in a message. This message is
processed by the recipient application.
RabbitMQ interview Questions and Answers
When and why to use RabbitMQ?
Message queueing is useful when you want to exchange a message
for consumption or for balance of loads between workers with multiple
recipients. The user is able to take a message from the queue while
the producer is in the queue, and start processing. The consumer can
be on a different server or on the same server than the publisher. The
requested application can be of one language and the consumer
application is of other language – the message broker would not care
about the application languages, it just send messages between
consumer and reciever. Which also reduces the dependencies or
coupling between the application.
What Is binding And routing Key?
A binding is a “bridge” that you set up to connect a queue to an exchange.
The routing key is an attribute message that the exchange examines when
determining how to route the message to queues.
What is a RabbitMQ channel?
They enable you to have a single connection to the RabbiMQ server,
but for different parts of your application they have sandboxed communication.
Channels are how the RabbitMQ server communicates with your application.
It hold one connection (instance) per client process and many channels
in that process (instance)
Which Protocol RabbitMQ uses?
RabbitMQ uses Advanced Message Queuing Protocol (AMQP).
Its an open standard layer used to communicates date across network by means
of byte stream.
How to implement RabbitMQ retry mechanism?
Whenever any data in the message is transmitted that the receiver does not accept, or when a
message is sent to a queue that does not exist. The message is retried and sent up to a set
number of times. Even if the communication is not received by the recipient but is sent from the
sender’s end. Now In such instances, the message queue is marked as undeliverable or
deadLetter queue.
What is Exchange?
Messages are not posted directly in the queue; rather, the user sends messages to the exchange.
An exchange is responsible for routing the messages to the various queues. An exchange receives
messages from the producer request and routes them by bindings and routing keys to message
queues. A binding is a linkage between an exchange and a queue.
What is RabbitMQ Vhost?
A Virtual Host (a.k.a. ‘ vhost ‘) in AMQP is a namespace for objects such
as Exchanges, Queues and Bindings. RabbitMQ utilizes more concrete
implementation of virtual hosts, through effectively making them “virtual
clusters” on top of the broker.
How RabbitMQ differs from ActiveMQ?
RabbitMQ is open source message broker with support for several
protocols, written in Erlang. Whereas ActiveMQ is also open source with
support for several protocols, written in Java langauge.
Is RabbitMQ support MQTT (Message Queue Telemetry
Transport)?
RabbitMQ supports MQTT 3.1.1 through a plugin that ships to
the core distribution.
Supported MQTT Features:
•QoS0 and QoS1 publish & consume
•QoS2 publish (downgraded to QoS1)
•TLS
•Session stickiness
•Retained messages with pluggable storage backends
•Last Will and Testament (LWT)
What is Erlang ? Why is it required for RabbitMQ ?
Erlang is a general-purpose, concurrent, functional programming
language, as well as a garbage-collected runtime system. The RabbitMQ
server is written in the Erlang programming language and is built on the
Open Telecom Platform framework for clustering and failover. Since
RabbitMQ is built on top of Erlang, we will first need to install Erlang
beforing installing RabbitMQ.
Does RabbitMQ have any concept of message priority?
•RabbitMQ does have concept of priority-We can define the queue's
priority range at the time the queue is created
•Messages where priority is not set get a priority of 0
•Messages with a numeric priority higher than the maximum set on the
queue get the highest priority the queue supports
Is RabbitMQ persistent?
Having a queue durable is not same as making persistent messages. Messages can be distributed either with
making mode to persistent or transient. When you post your message, you need to set the delivery mode to
persistent if you want it to remain in your long-lasting queue during restart.
Is RabbitMQ uses database?
RabbitMQ intentionally does not store messages in a database. RabbitMQ writes messages to disk in below two
ways:
Messages published in delivery_mode=2
Memory pressure causes RabbitMQ to run out of RAM and transfers messages to the disk to free up RAM.
Does RabbitMQ is PUSH or PULL?
RabbitMQ uses a PUSH template and prevents exhausting consumers through the prefetch configured limit. PULL is
used by Kafka, where consumers request for messages from a particular offset batches.
What is Dead Letter Exchange in Rabbitmq?
If there is no appropriate queue for the message, the message will be dropped quietly. RabbitMQ offers an AMQP
extension known as the “Dead Letter Exchange”. The dead letter exchange provides features for collecting non-
deliverable messages.
What is routing key in RabbitMQ?
The routing key is a message attribute. The routing algorithm behind a direct exchange
is simple – a message goes to the queues whose binding key exactly matches the
routing key of the message.
What are the different types of exchange types in RabbitMQ?
RabbitMQ has following types of Exchanges-
Direct helps in transfering the messages to the queues on the basis of message
routing key.
Fanout helps in sending messages to all the queues that are linked with it.
Topic helps in exhanging matches between the routing key and the binding routing
pattern.
Headers helps in exchanging the routing attributes of the message headers.
How to delete all queues in RabbitMQ ?
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app
What is a Server in Rabbitmq?
RabbitMQ Servers are robust and scalable implementation of
AMQP broker, it helps in displaying a banner messages and
reports on the progress in the startup sequence with the
message Broker Running, that indicates the RabbitMQ broker
has been started successfully.
What ports does RabbitMQ use?
RabbitMQ Management console:
PORT 15672 for RabbitMQ version 3.x
PORT 55672 for RabbitMQ pre 3.x
SERVER_ERL_ARGS=”+K true +A30 +P
1048576 
-kernel inet_default_connect_options
[{nodelay,true}] 
-kernel inet_dist_listen_min 35197 
-kernel inet_dist_listen_max 35197″
What is Messaging?
Messaging is a communication mechanism used for
system interactions. In software development messaging
enables distributed communication that is loosely
coupled. A messaging client can send messages to, and
receive messages from, any other client.
What is Advanced Message Queuing Protocol (AMQP) ?
The Advanced Message Queuing Protocol (AMQP) is an
open standard application layer protocol for message-
oriented middleware. AMQP 0-9-1 is a binary messaging
protocol and semantic framework for microservices and
enterprise messaging.
How to restart RabbitMQ service?
We can restart it like any other service:
sudo service rabbitmq-server restart
We get a specific control interface as well:
sudo rabbitmqctl “report”
sudo rabbitmqctl “reset”
What is the routing key in RabbitMQ?
The message structure in the RabbitMQ is divided into two parts. They are the payload
and routing key.
The routing key is used to describe the payload passed by the system and the
messaging system itself to determine who will be the receiver of the payload. The routing
key also enables you to bind queues to exchanges to deliver the message to the queue
based on the four types of exchanges.
MQ What are the disadvantages?
Reduced system availability , Dependence on the outside
You need to consider MQ Lost message , The problem of repeated consumption
It takes effort to ensure the order of messages , Uniformity.
What is Fanout Exchange ?
Fanout exchange routes the messages to all queues which are bound to it. Say if there
are 5 queues bound to Fanout Exchange then when message comes to Fanout
Exchange it will go to all 5 queues. It is kind of publish-subscribe.
What is binding ?
It is link OR connection between exchange and queue. For exchange to route the
message to particular queue that queue should be bound to exchange with routing key or
headers.
THANK YOU
Like the Video and Subscribe the Channel

More Related Content

PDF
The Complete Guide to Service Mesh
PPTX
Microservices With Istio Service Mesh
PPTX
Intro to Azure Service Bus
PPSX
Docker Kubernetes Istio
PDF
PDF
Building Microservices with Event Sourcing and CQRS
PDF
KAFKA 3.1.0.pdf
PDF
Service mesh(istio) monitoring
The Complete Guide to Service Mesh
Microservices With Istio Service Mesh
Intro to Azure Service Bus
Docker Kubernetes Istio
Building Microservices with Event Sourcing and CQRS
KAFKA 3.1.0.pdf
Service mesh(istio) monitoring

What's hot (20)

PPTX
The RabbitMQ Message Broker
PDF
Introduction to AMQP Messaging with RabbitMQ
PDF
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
PDF
Understanding Azure Networking Services
PDF
Istio Service Mesh
PPTX
AWS 기반 대규모 트래픽 견디기 - 장준엽 (구로디지털 모임) :: AWS Community Day 2017
PPTX
PDF
Introduction to ESB Architecture and Message Flow
PPT
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
PDF
AWS Media Day- AWS Media Tailor를 사용한 서버 사이드 광고 삽입으로 컨텐츠 수익화 (Mark Cousins통합 시...
PPTX
Azure Service Bus
PDF
HA Deployment Architecture with HAProxy and Keepalived
PDF
Ansible Automation to Rule Them All
ODP
Introduction To RabbitMQ
PPTX
Rest API Security
PPTX
Windows Azure Service Bus
PDF
The Zen of High Performance Messaging with NATS
PDF
Microservices in Practice
PPTX
Infrastructure as Code - Getting Started, Concepts & Tools
PDF
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
The RabbitMQ Message Broker
Introduction to AMQP Messaging with RabbitMQ
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
Understanding Azure Networking Services
Istio Service Mesh
AWS 기반 대규모 트래픽 견디기 - 장준엽 (구로디지털 모임) :: AWS Community Day 2017
Introduction to ESB Architecture and Message Flow
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
AWS Media Day- AWS Media Tailor를 사용한 서버 사이드 광고 삽입으로 컨텐츠 수익화 (Mark Cousins통합 시...
Azure Service Bus
HA Deployment Architecture with HAProxy and Keepalived
Ansible Automation to Rule Them All
Introduction To RabbitMQ
Rest API Security
Windows Azure Service Bus
The Zen of High Performance Messaging with NATS
Microservices in Practice
Infrastructure as Code - Getting Started, Concepts & Tools
Squid, SquidGuard, and Lightsquid on pfSense 2.3 & 2.4 - pfSense Hangout Janu...
Ad

Similar to RabbitMQ interview Questions and Answers (20)

PDF
Messaging Standards and Systems - AMQP & RabbitMQ
PDF
Messaging Standards and Systems - AMQP & RabbitMQ
PDF
Keynote: Idiomatic RabbitMQ - Gavin M Roy
PPTX
RabbitMQ and AMQP with .net client library
PPTX
Rabbit MQ
PDF
quickguide-einnovator-3-rabbitmq
PPTX
RabbitMQ and AMQP Model
PDF
IRJET- Development of Android Application for Device to Device Communication ...
PDF
Rabbitmq basics
PPTX
Mule with rabbitmq
PPTX
Rabbit mq
PDF
Enterprise Messaging with RabbitMQ.pdf
PPTX
Spring RabbitMQ
PPTX
Rabbit MQ introduction
PDF
Multi-platform Enterprise Messaging with RabbitMQ
PPTX
Rabbit mq in mule
PPTX
Rabbitmq @ tgndevs meetup
PPTX
Scaling application with RabbitMQ
PPTX
Mule rabbit mq
PDF
Messaging with amqp and rabbitmq
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
Keynote: Idiomatic RabbitMQ - Gavin M Roy
RabbitMQ and AMQP with .net client library
Rabbit MQ
quickguide-einnovator-3-rabbitmq
RabbitMQ and AMQP Model
IRJET- Development of Android Application for Device to Device Communication ...
Rabbitmq basics
Mule with rabbitmq
Rabbit mq
Enterprise Messaging with RabbitMQ.pdf
Spring RabbitMQ
Rabbit MQ introduction
Multi-platform Enterprise Messaging with RabbitMQ
Rabbit mq in mule
Rabbitmq @ tgndevs meetup
Scaling application with RabbitMQ
Mule rabbit mq
Messaging with amqp and rabbitmq
Ad

More from jeetendra mandal (20)

PPTX
what is OSI model
PPTX
What is AWS Cloud Watch
PPTX
What is AWS Fargate
PPTX
Eventual consistency vs Strong consistency what is the difference
PPTX
Batch Processing vs Stream Processing Difference
PPTX
Difference between Database vs Data Warehouse vs Data Lake
PPTX
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
PPTX
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
PPTX
Difference Program vs Process vs Thread
PPTX
Carrier Advice for a JAVA Developer How to Become a Java Programmer
PPTX
How to become a Software Tester Carrier Path for Software Quality Tester
PPTX
How to become a Software Engineer Carrier Path for Software Developer
PPTX
Events vs Notifications
PPTX
Microservice Architecture Software Architecture Microservice Design Pattern
PPTX
Event Driven Software Architecture Pattern
PPTX
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
PPTX
Observability vs APM vs Monitoring Comparison
PPTX
Disaster Recovery vs Data Backup what is the difference
PPTX
What is Spinnaker? Spinnaker tutorial
PPTX
Difference between Github vs Gitlab vs Bitbucket
what is OSI model
What is AWS Cloud Watch
What is AWS Fargate
Eventual consistency vs Strong consistency what is the difference
Batch Processing vs Stream Processing Difference
Difference between Database vs Data Warehouse vs Data Lake
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
Difference Program vs Process vs Thread
Carrier Advice for a JAVA Developer How to Become a Java Programmer
How to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Engineer Carrier Path for Software Developer
Events vs Notifications
Microservice Architecture Software Architecture Microservice Design Pattern
Event Driven Software Architecture Pattern
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Observability vs APM vs Monitoring Comparison
Disaster Recovery vs Data Backup what is the difference
What is Spinnaker? Spinnaker tutorial
Difference between Github vs Gitlab vs Bitbucket

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Approach and Philosophy of On baking technology
PDF
KodekX | Application Modernization Development
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Monthly Chronicles - July 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation theory and applications.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

RabbitMQ interview Questions and Answers

  • 2. What is RabbitMQ? RabbitMQ is an open-source message-broker software is also known as message queueing technology. It defines queues to which applications communicate for data transfer, or message transmission. Any kind of information could be included in a message. This message is processed by the recipient application.
  • 4. When and why to use RabbitMQ? Message queueing is useful when you want to exchange a message for consumption or for balance of loads between workers with multiple recipients. The user is able to take a message from the queue while the producer is in the queue, and start processing. The consumer can be on a different server or on the same server than the publisher. The requested application can be of one language and the consumer application is of other language – the message broker would not care about the application languages, it just send messages between consumer and reciever. Which also reduces the dependencies or coupling between the application.
  • 5. What Is binding And routing Key? A binding is a “bridge” that you set up to connect a queue to an exchange. The routing key is an attribute message that the exchange examines when determining how to route the message to queues. What is a RabbitMQ channel? They enable you to have a single connection to the RabbiMQ server, but for different parts of your application they have sandboxed communication. Channels are how the RabbitMQ server communicates with your application. It hold one connection (instance) per client process and many channels in that process (instance) Which Protocol RabbitMQ uses? RabbitMQ uses Advanced Message Queuing Protocol (AMQP). Its an open standard layer used to communicates date across network by means of byte stream.
  • 6. How to implement RabbitMQ retry mechanism? Whenever any data in the message is transmitted that the receiver does not accept, or when a message is sent to a queue that does not exist. The message is retried and sent up to a set number of times. Even if the communication is not received by the recipient but is sent from the sender’s end. Now In such instances, the message queue is marked as undeliverable or deadLetter queue. What is Exchange? Messages are not posted directly in the queue; rather, the user sends messages to the exchange. An exchange is responsible for routing the messages to the various queues. An exchange receives messages from the producer request and routes them by bindings and routing keys to message queues. A binding is a linkage between an exchange and a queue.
  • 7. What is RabbitMQ Vhost? A Virtual Host (a.k.a. ‘ vhost ‘) in AMQP is a namespace for objects such as Exchanges, Queues and Bindings. RabbitMQ utilizes more concrete implementation of virtual hosts, through effectively making them “virtual clusters” on top of the broker. How RabbitMQ differs from ActiveMQ? RabbitMQ is open source message broker with support for several protocols, written in Erlang. Whereas ActiveMQ is also open source with support for several protocols, written in Java langauge.
  • 8. Is RabbitMQ support MQTT (Message Queue Telemetry Transport)? RabbitMQ supports MQTT 3.1.1 through a plugin that ships to the core distribution. Supported MQTT Features: •QoS0 and QoS1 publish & consume •QoS2 publish (downgraded to QoS1) •TLS •Session stickiness •Retained messages with pluggable storage backends •Last Will and Testament (LWT)
  • 9. What is Erlang ? Why is it required for RabbitMQ ? Erlang is a general-purpose, concurrent, functional programming language, as well as a garbage-collected runtime system. The RabbitMQ server is written in the Erlang programming language and is built on the Open Telecom Platform framework for clustering and failover. Since RabbitMQ is built on top of Erlang, we will first need to install Erlang beforing installing RabbitMQ. Does RabbitMQ have any concept of message priority? •RabbitMQ does have concept of priority-We can define the queue's priority range at the time the queue is created •Messages where priority is not set get a priority of 0 •Messages with a numeric priority higher than the maximum set on the queue get the highest priority the queue supports
  • 10. Is RabbitMQ persistent? Having a queue durable is not same as making persistent messages. Messages can be distributed either with making mode to persistent or transient. When you post your message, you need to set the delivery mode to persistent if you want it to remain in your long-lasting queue during restart. Is RabbitMQ uses database? RabbitMQ intentionally does not store messages in a database. RabbitMQ writes messages to disk in below two ways: Messages published in delivery_mode=2 Memory pressure causes RabbitMQ to run out of RAM and transfers messages to the disk to free up RAM. Does RabbitMQ is PUSH or PULL? RabbitMQ uses a PUSH template and prevents exhausting consumers through the prefetch configured limit. PULL is used by Kafka, where consumers request for messages from a particular offset batches. What is Dead Letter Exchange in Rabbitmq? If there is no appropriate queue for the message, the message will be dropped quietly. RabbitMQ offers an AMQP extension known as the “Dead Letter Exchange”. The dead letter exchange provides features for collecting non- deliverable messages.
  • 11. What is routing key in RabbitMQ? The routing key is a message attribute. The routing algorithm behind a direct exchange is simple – a message goes to the queues whose binding key exactly matches the routing key of the message. What are the different types of exchange types in RabbitMQ? RabbitMQ has following types of Exchanges- Direct helps in transfering the messages to the queues on the basis of message routing key. Fanout helps in sending messages to all the queues that are linked with it. Topic helps in exhanging matches between the routing key and the binding routing pattern. Headers helps in exchanging the routing attributes of the message headers.
  • 12. How to delete all queues in RabbitMQ ? rabbitmqctl stop_app rabbitmqctl reset rabbitmqctl start_app What is a Server in Rabbitmq? RabbitMQ Servers are robust and scalable implementation of AMQP broker, it helps in displaying a banner messages and reports on the progress in the startup sequence with the message Broker Running, that indicates the RabbitMQ broker has been started successfully.
  • 13. What ports does RabbitMQ use? RabbitMQ Management console: PORT 15672 for RabbitMQ version 3.x PORT 55672 for RabbitMQ pre 3.x SERVER_ERL_ARGS=”+K true +A30 +P 1048576 -kernel inet_default_connect_options [{nodelay,true}] -kernel inet_dist_listen_min 35197 -kernel inet_dist_listen_max 35197″
  • 14. What is Messaging? Messaging is a communication mechanism used for system interactions. In software development messaging enables distributed communication that is loosely coupled. A messaging client can send messages to, and receive messages from, any other client. What is Advanced Message Queuing Protocol (AMQP) ? The Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message- oriented middleware. AMQP 0-9-1 is a binary messaging protocol and semantic framework for microservices and enterprise messaging.
  • 15. How to restart RabbitMQ service? We can restart it like any other service: sudo service rabbitmq-server restart We get a specific control interface as well: sudo rabbitmqctl “report” sudo rabbitmqctl “reset” What is the routing key in RabbitMQ? The message structure in the RabbitMQ is divided into two parts. They are the payload and routing key. The routing key is used to describe the payload passed by the system and the messaging system itself to determine who will be the receiver of the payload. The routing key also enables you to bind queues to exchanges to deliver the message to the queue based on the four types of exchanges.
  • 16. MQ What are the disadvantages? Reduced system availability , Dependence on the outside You need to consider MQ Lost message , The problem of repeated consumption It takes effort to ensure the order of messages , Uniformity. What is Fanout Exchange ? Fanout exchange routes the messages to all queues which are bound to it. Say if there are 5 queues bound to Fanout Exchange then when message comes to Fanout Exchange it will go to all 5 queues. It is kind of publish-subscribe. What is binding ? It is link OR connection between exchange and queue. For exchange to route the message to particular queue that queue should be bound to exchange with routing key or headers.
  • 17. THANK YOU Like the Video and Subscribe the Channel