0
0
RabbitMQdevops~20 mins

Message acknowledgment in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Message Acknowledgment Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the output when a message is acknowledged in RabbitMQ?
You have a consumer that receives a message from a queue and sends a manual acknowledgment using channel.basicAck(deliveryTag, false). What happens to the message in the queue?
AThe message is moved to a dead-letter queue automatically.
BThe message remains in the queue but is marked as acknowledged.
CThe message is removed from the queue and will not be delivered again.
DThe message is duplicated and sent to all consumers.
Attempts:
2 left
💡 Hint
Think about what acknowledgment means in message queues.
🧠 Conceptual
intermediate
2:00remaining
Which RabbitMQ setting controls automatic message acknowledgment?
In RabbitMQ, which consumer setting determines if messages are acknowledged automatically upon delivery?
AprefetchCount set to 1
BautoAck (or noAck) flag set to true
Cdurable flag set to true
Dexclusive flag set to true
Attempts:
2 left
💡 Hint
Look for the flag that controls acknowledgment behavior.
Troubleshoot
advanced
2:00remaining
Why are messages re-delivered repeatedly despite manual acknowledgment?
A consumer uses manual acknowledgment but messages keep reappearing in the queue after processing. What is the most likely cause?
AThe consumer never calls <code>basicAck</code> after processing messages.
BThe queue is set to durable, causing message duplication.
CThe prefetch count is set too high, causing message overflow.
DThe consumer uses <code>autoAck=true</code> instead of manual acknowledgment.
Attempts:
2 left
💡 Hint
Think about what happens if acknowledgment is not sent.
🔀 Workflow
advanced
2:00remaining
Order the steps for manual message acknowledgment in RabbitMQ
Arrange the following steps in the correct order for a consumer to manually acknowledge a message:
A3,1,2,4
B1,3,2,4
C2,1,3,4
D1,2,3,4
Attempts:
2 left
💡 Hint
Think about receiving, processing, then acknowledging.
Best Practice
expert
2:00remaining
What is the best practice for handling message acknowledgment to avoid message loss?
Which approach best prevents message loss in RabbitMQ when processing messages?
AUse manual acknowledgment and only call basicAck after successful processing
BUse automatic acknowledgment to speed up processing
CAcknowledge messages before processing to avoid duplicates
DDisable acknowledgments and rely on queue durability
Attempts:
2 left
💡 Hint
Consider when to acknowledge messages to ensure they are processed safely.