0
0
RabbitMQdevops~20 mins

Priority queues in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Priority Queue Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
RabbitMQ Priority Queue Declaration Output
What is the output when you declare a priority queue with max priority 10 using the rabbitmqctl command?
RabbitMQ
rabbitmqctl list_queues name arguments

# Assume the queue was declared with:
# arguments = {"x-max-priority": 10}
A[{"name": "task_queue", "arguments": {"x-max-priority": 10}}]
B[{"name": "task_queue", "arguments": {}}]
CError: Unknown argument x-max-priority
D[{"name": "task_queue", "arguments": {"max-priority": 10}}]
Attempts:
2 left
💡 Hint
Check the exact argument key name for priority in RabbitMQ queue declaration.
🧠 Conceptual
intermediate
2:00remaining
Priority Queue Message Ordering Behavior
In RabbitMQ, if a priority queue is declared with max priority 5, what happens when messages with priorities 1, 3, and 5 are published?
AMessages with priority 5 are delivered before 3 and 1, regardless of publish order.
BMessages are delivered strictly in the order they were published, ignoring priority.
CMessages with priority 1 are delivered first, then 3, then 5.
DMessages with priority 3 and 5 are delivered randomly, but priority 1 is last.
Attempts:
2 left
💡 Hint
Think about how priority affects message delivery order in RabbitMQ queues.
Configuration
advanced
2:00remaining
Correct Queue Declaration with Priority in RabbitMQ
Which of the following queue declarations correctly sets a max priority of 15 using the RabbitMQ management HTTP API JSON payload?
A{"auto_delete": false, "durable": true, "arguments": {"x-priority-max": 15}}
B{"auto_delete": false, "durable": true, "arguments": {"max_priority": 15}}
C{"auto_delete": false, "durable": true, "arguments": {"x-max-priority": 15}}
D{"auto_delete": false, "durable": true, "arguments": {"priority": 15}}
Attempts:
2 left
💡 Hint
Check the exact argument key RabbitMQ expects for max priority in queue arguments.
Troubleshoot
advanced
2:00remaining
Why Are Messages Not Prioritized in RabbitMQ Queue?
You declared a queue with max priority 10, but messages are delivered in publish order ignoring priority. What is the most likely cause?
AThe queue was declared without the 'x-max-priority' argument, so priority is disabled.
BThe consumer is not acknowledging messages, causing re-delivery.
CThe RabbitMQ server version does not support priority queues.
DThe messages do not have the 'priority' property set when published.
Attempts:
2 left
💡 Hint
Priority only affects delivery if messages have priority set.
🔀 Workflow
expert
3:00remaining
Steps to Enable and Verify Priority Queue in RabbitMQ
What is the correct sequence of steps to create a priority queue and verify it works in RabbitMQ?
A4,1,2,3
B1,4,2,3
C1,2,4,3
D2,1,4,3
Attempts:
2 left
💡 Hint
Think about declaring the queue first, then verifying, then publishing and consuming.