1. What is RabbitMQ primarily used for?
A) Data storage
B) Message queuing
C) Database management
D) Load balancing
Answer: B) Message queuing
2. Which protocol does RabbitMQ use for message communication?
A) HTTP
B) SMTP
C) AMQP
D) WebSocket
Answer: C) AMQP
3. What does AMQP stand for?
A) Advanced Message Queuing Protocol
B) Asynchronous Messaging and Queueing Protocol
C) Application Message Queue Protocol
D) Automated Messaging and Queue Processing
Answer: A) Advanced Message Queuing Protocol
4. Which language is RabbitMQ written in?
A) Java
B) Python
C) Erlang
D) C++
Answer: C) Erlang
5. What is a "producer" in RabbitMQ?
A) A consumer application
B) A message sender
C) A message broker
D) A message queue
Answer: B) A message sender
6. What is a "consumer" in RabbitMQ?
A) A producer application
B) A message sender
C) A message broker
D) A message receiver
Answer: D) A message receiver
7. In RabbitMQ, what is a "queue"?
A) A message sender
B) A message receiver
C) A message storage area
D) A message broker
Answer: C) A message storage area
8. Which RabbitMQ component routes messages to the appropriate queues?
A) Producer
B) Consumer
C) Exchange
D) Channel
Answer: C) Exchange
9. What are the different types of exchanges in RabbitMQ?
A) Direct, Fanout, Topic, Headers
B) Send, Receive, Publish, Subscribe
C) Producer, Consumer, Broker, Queue
D) TCP, UDP, HTTP, SMTP
Answer: A) Direct, Fanout, Topic, Headers
10. Which type of exchange routes messages to queues based on a pattern match?
A) Direct
B) Fanout
C) Topic
D) Headers
Answer: C) Topic
11. Which RabbitMQ exchange type broadcasts messages to all bound queues?
A) Direct
B) Fanout
C) Topic
D) Headers
Answer: B) Fanout
12. What is a "binding" in RabbitMQ?
A) A connection between producer and consumer
B) A connection between an exchange and a queue
C) A connection between the RabbitMQ server and the client
D) A message pattern match
Answer: B) A connection between an exchange and a queue
13. Which RabbitMQ feature allows for delaying the delivery of a message?
A) Dead letter exchange
B) Message persistence
C) Message routing
D) Message priority
Answer: A) Dead letter exchange
14. How can you ensure that a message is not lost even if the RabbitMQ server crashes?
A) Use message persistence
B) Use high network bandwidth
C) Use a direct exchange
D) Use a fanout exchange
Answer: A) Use message persistence
15. What is a "virtual host" in RabbitMQ?
A) A separate physical server for message queues
B) A separate queue within the same exchange
C) A logical grouping of resources and permissions
D) A high availability cluster
Answer: C) A logical grouping of resources and permissions
16. In RabbitMQ, what is the purpose of a "channel"?
A) It's a separate RabbitMQ server
B) It's a separate RabbitMQ instance
C) It's a connection to a message broker
D) It's a lightweight connection within a connection
Answer: D) It's a lightweight connection within a connection
17. What is a "connection factory" in RabbitMQ?
A) A factory that produces messages
B) A factory for creating channels
C) A factory for creating queues
D) A factory for creating virtual hosts
Answer: B) A factory for creating channels
18. How can you acknowledge the receipt of a message in RabbitMQ?
A) Use the acknowledge command
B) Use the confirm method
C) Publish a new message
D) Use the basicAck method
Answer: D) Use the basicAck method
19. What is the purpose of a "dead-letter exchange" in RabbitMQ?
A) To prevent messages from being delivered
B) To automatically delete messages
C) To route messages to a special queue when they can't be processed
D) To broadcast messages to all queues
Answer: C) To route messages to a special queue when they can't be processed
20. How can you set a message's priority in RabbitMQ?
A) Use the priority field in the message body
B) Use the setMessagePriority method
C) Use the basicPublish method with the priority argument
D) Use a special exchange for high-priority messages
Answer: C) Use the basicPublish method with the priority argument
21. What is the default messaging pattern in RabbitMQ?
A) Publish/Subscribe
B) Request/Reply
C) One-to-One
D) Fanout
Answer: C) One-to-One
22. Which RabbitMQ client library is commonly used with Python applications?
A) pika
B) pyMQ
C) RabbitPython
D) amqplib
Answer: A) pika
23. In RabbitMQ, what does "AMQP 0-9-1" refer to?
A) A specific version of the AMQP protocol
B) A RabbitMQ plugin
C) A programming language
D) A message format
Answer: A) A specific version of the AMQP protocol
24. What is "RabbitMQ clustering" used for?
A) Load balancing messages
B) Redundancy and high availability
C) Enabling dead-letter exchanges
D) Managing virtual hosts
Answer: B) Redundancy and high availability
25. Which component in RabbitMQ handles message routing and delivery to consumers?
A) Queue
B) Channel
C) Exchange
D) Producer
Answer: C) Exchange
26. Which programming language was RabbitMQ initially implemented in?
A) Python
B) Java
C) Erlang
D) C++
Answer: C) Erlang
27. What is a "message broker" in RabbitMQ?
A) A component that connects producers to consumers
B) A server that stores messages
C) An exchange that routes messages
D) A client library for RabbitMQ
Answer: A) A component that connects producers to consumers
28. What does the term "message acknowledgment" mean in RabbitMQ?
A) Confirming that a message has been received and processed
B) Sending an acknowledgment message
C) Rejecting a message
D) Notifying the producer of a message
Answer: A) Confirming that a message has been received and processed
29. Which RabbitMQ exchange type is used for direct message routing based on a key?
A) Fanout
B) Topic
C) Direct
D) Headers
Answer: C) Direct
30. How can you implement a Publish/Subscribe pattern in RabbitMQ?
A) Use a direct exchange
B) Use a fanout exchange
C) Use a topic exchange
D) Use a headers exchange
Answer: B) Use a fanout exchange
31. What is the purpose of the "mandatory" flag when publishing a message in RabbitMQ?
A) It ensures that the message is delivered to all queues.
B) It indicates that the message must be acknowledged by the consumer.
C) It ensures that the message is published with a specific routing key.
D) It ensures that the message is routed to at least one queue.
Answer: D) It ensures that the message is routed to at least one queue.
Top comments (0)