0
0
RabbitMQdevops~20 mins

Work queue for task distribution in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RabbitMQ Work Queue Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
RabbitMQ Work Queue: Message Acknowledgment Behavior
Consider a RabbitMQ work queue where a worker receives a message but crashes before sending an acknowledgment. What happens to the message in the queue?
AThe message remains unacknowledged and is requeued for another worker.
BThe message is lost and removed from the queue.
CThe message is acknowledged automatically by RabbitMQ.
DThe message is duplicated and sent to all workers.
Attempts:
2 left
💡 Hint
Think about how RabbitMQ ensures tasks are not lost if a worker fails.
Configuration
intermediate
2:00remaining
Configuring RabbitMQ Prefetch Count for Fair Dispatch
Which configuration setting ensures that a RabbitMQ worker receives only one unacknowledged message at a time to balance load fairly?
ASet auto_ack to true when consuming messages
BSet prefetch_count to 0 to allow unlimited messages
CSet durable flag to true on the queue
DSet prefetch_count to 1 using channel.basic_qos(prefetch_count=1)
Attempts:
2 left
💡 Hint
This setting limits how many messages a worker can hold without acknowledging.
🔀 Workflow
advanced
2:30remaining
RabbitMQ Work Queue: Task Distribution Workflow
Arrange the steps in the correct order for a RabbitMQ work queue where tasks are distributed fairly and reliably to workers.
A1,3,2,4
B1,2,3,4
C2,1,3,4
D3,1,2,4
Attempts:
2 left
💡 Hint
Think about queue setup, message publishing, worker configuration, then processing.
Troubleshoot
advanced
2:00remaining
Troubleshooting RabbitMQ Work Queue: Messages Not Being Redelivered
A worker crashes while processing a message but the message is not redelivered to other workers. What is the most likely cause?
AThe queue is not durable, so messages are lost on worker crash.
BThe prefetch_count is set to 1, limiting message delivery.
CThe worker is using auto_ack=True, so messages are acknowledged immediately.
DThe message was published as non-persistent.
Attempts:
2 left
💡 Hint
Check how message acknowledgments are handled by the worker.
Best Practice
expert
3:00remaining
Best Practice for Ensuring Reliable Task Processing in RabbitMQ Work Queues
Which practice best ensures that tasks are not lost and are fairly distributed among workers in a RabbitMQ work queue?
ADeclare durable queues, publish persistent messages, use manual acknowledgments, and set prefetch_count=1.
BUse non-durable queues with auto_ack=True for faster processing.
CPublish messages without persistence and rely on worker retries.
DSet prefetch_count to 0 and use auto_ack=False for unlimited message delivery.
Attempts:
2 left
💡 Hint
Think about durability, acknowledgments, and fair load distribution.