BACKEND30 questions • ~12 min
RabbitMQ Concepts Quiz
Test your understanding of RabbitMQ exchanges, routing keys, and queue patterns.
RabbitMQ Concepts Quiz
Test your understanding of RabbitMQ exchanges, routing keys, and queue patterns.
1. What is RabbitMQ?
- A relational database management system
- An open-source AMQP message broker
- A REST API gateway
- A distributed key-value store
2. In a typical RabbitMQ message flow, what is the correct order of components?
- Consumer → Queue → Exchange → Producer
- Producer → Queue → Exchange → Consumer
- Producer → Exchange → Queue → Consumer
- Exchange → Producer → Queue → Consumer
3. What is a binding in RabbitMQ?
- A TCP connection between two brokers
- A rule that links an exchange to a queue (or another exchange)
- The authentication credential used by a producer
- A named reference to a virtual host
4. What is the default exchange in RabbitMQ?
- A fanout exchange named 'default'
- A pre-declared direct exchange with an empty string name
- A topic exchange named 'amq.default'
- A headers exchange that must be declared before use
5. What is the difference between a durable and a transient queue?
- Durable queues survive broker restarts; transient queues do not
- Durable queues are faster; transient queues are slower
- Durable queues can hold more messages than transient queues
- Durable queues require authentication; transient queues do not
6. What does a consumer send to RabbitMQ to confirm it has successfully processed a message?
- A NACK
- A REJECT
- An ACK (acknowledgement)
- A CONFIRM
7. What is the difference between basic.nack and basic.reject in RabbitMQ?
- basic.nack supports bulk rejection of multiple messages; basic.reject handles only one message at a time
- basic.reject requeues the message; basic.nack discards it permanently
- basic.nack is only available in AMQP 1.0; basic.reject is AMQP 0-9-1
- There is no functional difference
8. Which RabbitMQ built-in plugin provides a browser-based management and monitoring dashboard?
- rabbitmq_shovel
- rabbitmq_management
- rabbitmq_federation
- rabbitmq_stomp
9. What does the prefetch count (basic.qos) setting control in RabbitMQ?
- The maximum number of queues a channel can subscribe to
- The maximum number of unacknowledged messages delivered to a consumer at once
- The maximum message size in bytes
- The maximum number of connections per virtual host
10. Why is RabbitMQ generally preferred over a relational database for task queue workloads?
- RabbitMQ stores messages in SQL tables for easy querying
- RabbitMQ provides built-in push delivery, acknowledgements, and back-pressure without polling
- A database cannot persist data across restarts
- RabbitMQ automatically generates SQL schemas for task metadata
11. How does a direct exchange route messages?
- It broadcasts the message to every bound queue regardless of routing key
- It routes the message to queues whose binding key exactly matches the message's routing key
- It uses message header attributes to decide routing
- It routes based on wildcard patterns in the binding key
12. What is the defining behaviour of a fanout exchange?
- It routes messages only to queues whose binding key matches the routing key
- It broadcasts every message to all bound queues, completely ignoring the routing key
- It routes messages using wildcard patterns (* and #)
- It sends messages only to queues on the same node
13. In a topic exchange binding key, what does the '#' wildcard match?
- Exactly one dot-separated word
- Any single character
- Zero or more dot-separated words
- Only numeric characters
14. How does a headers exchange decide which queues receive a message?
- It matches the message routing key against binding key wildcards
- It ignores routing keys entirely and routes based on message header attributes matching binding arguments
- It round-robins messages across all bound queues
- It routes based on the message body content type
15. What is the conceptual difference between a routing key and a binding key in RabbitMQ?
- They are identical: both terms refer to the same string set by the producer
- The routing key is set by the producer on the message; the binding key is set when a queue is bound to an exchange
- The binding key is set by the producer; the routing key is set on the queue
- Routing keys are only used by direct exchanges; binding keys are only used by topic exchanges
16. How is a Dead Letter Exchange (DLX) configured for a queue?
- By setting the 'x-dead-letter-exchange' argument when declaring the queue
- By publishing directly to an exchange named 'dlx'
- By enabling the rabbitmq_dlx plugin
- By setting the 'dead-letter' property on each message individually
17. What is the difference between setting a message TTL per-queue versus per-message?
- Per-queue TTL applies to all messages in that queue via x-message-ttl; per-message TTL is set in the message expiration property and may vary per message
- Per-message TTL is always higher priority and overrides any queue TTL
- Per-queue TTL requires a plugin; per-message TTL is built-in
- There is no difference: both cause identical broker behaviour
18. What is the key advantage of publisher confirms over AMQP transactions (tx.select/tx.commit) in RabbitMQ?
- Publisher confirms are synchronous and block the channel until the broker commits
- Publisher confirms provide asynchronous, lightweight acknowledgement without the heavyweight two-phase commit overhead of transactions
- AMQP transactions support batch commits; publisher confirms do not
- Publisher confirms are only available for quorum queues
19. What is the primary purpose of the RabbitMQ Shovel plugin?
- To mirror queues across cluster nodes for high availability
- To reliably move or copy messages from a source queue/exchange to a destination queue/exchange, potentially across brokers
- To expose queues via an HTTP REST API
- To compress message payloads before storage
20. What is the main architectural difference between quorum queues and classic mirrored queues?
- Quorum queues use Raft consensus for replication; classic mirrored queues use asynchronous master-mirror replication
- Classic mirrored queues are faster because they use Raft; quorum queues use two-phase commit
- Quorum queues can only exist on a single node; mirrored queues span the whole cluster
- There is no difference: quorum queues are simply renamed mirrored queues
21. How does AMQP 0-9-1 enable multiple logical communication streams over a single TCP connection in RabbitMQ?
- By opening multiple TCP sockets bundled into one connection object
- Through channels: lightweight virtual connections multiplexed over a single TCP connection
- By using HTTP/2 stream multiplexing within the AMQP framing
- By encoding each logical stream as a separate virtual host
22. What does the AMQP 0-9-1 channel.flow mechanism do?
- It increases the prefetch window dynamically when the consumer is idle
- It allows the broker or client to pause/resume message delivery on a channel to apply back-pressure
- It migrates a channel from one TCP connection to another without interruption
- It flushes all pending messages from a channel's internal buffer to disk
23. What is the primary operational benefit of declaring a queue as a lazy queue?
- Lazy queues skip acknowledgement processing to increase throughput
- Lazy queues write messages directly to disk as they arrive rather than keeping them in memory, reducing RAM usage for deep queues
- Lazy queues replicate to disk only when the node restarts
- Lazy queues defer binding evaluation until a consumer connects
24. What is the key architectural difference between the Federation plugin and the Shovel plugin?
- Federation links are permanent; Shovel links are temporary and delete themselves after a single message
- Federation provides loosely coupled, broker-to-broker exchange/queue linking with autonomous nodes; Shovel is a simple point-to-point message mover that requires tight coupling
- Shovel supports AMQP 1.0; Federation only supports AMQP 0-9-1
- They are functionally identical: Federation is just the newer name for Shovel
25. What does the consistent hash exchange plugin accomplish that a standard direct or topic exchange cannot?
- It routes messages to exactly one queue chosen by a consistent hash of the routing key, distributing load while keeping messages with the same key on the same queue
- It replicates messages to all bound queues using a hash-based deduplication mechanism
- It hashes the message body for integrity verification before routing
- It ensures round-robin delivery across queues regardless of routing key
26. In a RabbitMQ cluster, what is the functional difference between disc nodes and RAM nodes?
- Disc nodes persist broker metadata (queues, exchanges, bindings, users) to disk; RAM nodes keep all metadata only in memory for lower latency writes
- RAM nodes handle message routing; disc nodes handle only persistent message storage
- Disc nodes can host quorum queues; RAM nodes cannot
- The terms are deprecated: all modern RabbitMQ nodes are identical
27. How do quorum queues use the Raft consensus algorithm to guarantee data safety?
- A message is considered confirmed only after a majority (quorum) of replicas have written it, ensuring no data loss even if a minority of nodes fail
- Raft is used only for leader election; message storage uses a separate two-phase commit protocol
- Quorum queues write to all replicas synchronously and require unanimous acknowledgement
- Raft ensures messages are deduplicated across all cluster nodes
28. When both a per-queue policy and a queue declaration argument (e.g., x-message-ttl) are set for the same queue, which takes precedence in RabbitMQ?
- Policies always win over declaration arguments
- Declaration arguments always win over policies
- Declaration arguments (set at queue creation) take precedence over policies for the same key
- Both are merged additively: neither overrides the other
29. Which pair of RabbitMQ management metrics most directly indicates that consumers are falling behind message producers?
- publish_rate and deliver_rate: when publish_rate consistently exceeds deliver_rate, messages_ready will grow
- memory_used and disk_free: a rising memory_used with falling disk_free shows consumer lag
- connection_count and channel_count: too many channels indicates consumer backlog
- node_uptime and gc_reclaim_rate: high GC activity confirms consumer lag
30. What is the recommended approach for graceful consumer shutdown in RabbitMQ to avoid message loss?
- Kill the process immediately: RabbitMQ will automatically requeue any unacknowledged messages
- Cancel the consumer subscription, finish processing all in-flight messages, send ACKs or NACKs for each, then close the channel and connection
- Call basic.reject on all messages, then close the TCP connection without sending a connection.close frame
- Set prefetch to 0 and wait for the broker to drain the queue before closing
About this quiz
This interactive quiz is crafted to provide a quick, engaging, and dynamic experience. Questions feature randomized options and your final result is computed immediately upon completion. Retake anytime and share your score with friends!
Quiz highlights:
- ✓100% free with no sign-up required
- ✓Engaging questions with instant feedback
- ✓Download custom story card and share with friends
Frequently Asked Questions
As you answer each question, the engine calculates your traits and choices to generate your unique result instantly.