0
0
RabbitMQdevops~20 mins

Message queue use cases in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Message Queue Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Primary use case of message queues in distributed systems
Which of the following best describes the main purpose of using a message queue like RabbitMQ in a distributed system?
ATo store large files and media content for web applications
BTo enable asynchronous communication between services, decoupling producers and consumers
CTo perform real-time data analytics on streaming data
DTo replace databases for persistent data storage
Attempts:
2 left
💡 Hint
Think about how services communicate without waiting for each other.
scaling
intermediate
2:00remaining
Scaling consumers with RabbitMQ
If a system uses RabbitMQ to process tasks and the number of tasks suddenly increases, what is the best way to handle the increased load?
AIncrease the size of the RabbitMQ server's disk space
BSwitch to a synchronous request-response model
CAdd more consumer instances to process messages in parallel
DReduce the message TTL (time to live) to discard old messages faster
Attempts:
2 left
💡 Hint
Think about how to process more messages at the same time.
tradeoff
advanced
2:00remaining
Tradeoff between message durability and performance
What is a common tradeoff when configuring RabbitMQ for message durability?
AEnabling message durability increases latency but prevents message loss on broker failure
BDisabling message durability improves security but reduces throughput
CDisabling message durability guarantees message delivery order
DEnabling message durability decreases latency and increases throughput
Attempts:
2 left
💡 Hint
Consider what happens when the broker crashes and how durability affects speed.
Architecture
advanced
2:00remaining
Designing a fault-tolerant task processing system with RabbitMQ
Which architectural pattern best ensures that tasks are not lost and are processed at least once using RabbitMQ?
AUse durable queues, persistent messages, and manual message acknowledgments
BUse transient queues with automatic message deletion after consumption
CUse non-persistent messages with auto-acknowledgment enabled
DUse a single consumer with no message acknowledgments
Attempts:
2 left
💡 Hint
Think about how to avoid losing messages even if the system crashes.
estimation
expert
3:00remaining
Estimating RabbitMQ capacity for peak load
A system expects to receive 10,000 messages per second at peak. Each message is 1 KB in size. The RabbitMQ server has a network bandwidth of 1 Gbps and disk write speed of 100 MB/s. What is the main bottleneck when enabling message durability?
ADisk write speed is the bottleneck because 10,000 KB/s (approx 10 MB/s) is less than disk speed, so no bottleneck
BNetwork bandwidth is the bottleneck because 10,000 KB/s equals 80 Mbps, which is less than 1 Gbps
CDisk write speed is the bottleneck because 10,000 KB/s (approx 10 MB/s) is close to disk speed limit
DNeither network nor disk is a bottleneck because both exceed the required throughput
Attempts:
2 left
💡 Hint
Calculate the data rate and compare with bandwidth and disk speed.