0
0
RabbitMQdevops~20 mins

Alerting on queue depth and consumer lag in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RabbitMQ Alerting Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding queue depth alerting

What does monitoring the queue depth in RabbitMQ help you detect?

AIt tracks the total number of messages published since server start.
BIt shows the number of consumers connected to the queue.
CIt measures the network latency between RabbitMQ nodes.
DIt helps detect if messages are piling up, indicating slow processing or blocked consumers.
Attempts:
2 left
💡 Hint

Think about what it means if many messages wait in the queue.

💻 Command Output
intermediate
2:00remaining
Interpreting consumer lag from RabbitMQ CLI

Given the output below from rabbitmqctl list_queues name messages_ready messages_unacknowledged, what is the consumer lag?

queue1 10 5
queue2 0 0
queue3 3 7
RabbitMQ
rabbitmqctl list_queues name messages_ready messages_unacknowledged
Aqueue1 has 5 messages lagging; queue2 has 0; queue3 has 7 messages lagging.
Bqueue1 has a lag of 15 messages; queue2 has no lag; queue3 has a lag of 10 messages.
Cqueue1 has 10 messages lagging; queue2 has 0; queue3 has 3 messages lagging.
Dqueue1 has 10 messages ready only; consumer lag cannot be determined.
Attempts:
2 left
💡 Hint

Consumer lag is the sum of messages ready and unacknowledged.

Configuration
advanced
2:30remaining
Configuring alert for queue depth using Prometheus

Which Prometheus alert rule correctly triggers when RabbitMQ queue depth exceeds 1000 messages for more than 5 minutes?

A
alert: HighQueueDepth
expr: rabbitmq_queue_messages_ready > 1000
for: 5m
labels:
  severity: warning
annotations:
  summary: "Queue depth high"
B
alert: HighQueueDepth
expr: rabbitmq_queue_messages_ready >= 1000
for: 1m
labels:
  severity: critical
annotations:
  summary: "Queue depth high"
C
alert: HighQueueDepth
expr: rabbitmq_queue_messages_ready > 1000
labels:
  severity: warning
annotations:
  summary: "Queue depth high"
D
alert: HighQueueDepth
expr: rabbitmq_queue_messages_ready > 1000
for: 10m
labels:
  severity: warning
annotations:
  summary: "Queue depth high"
Attempts:
2 left
💡 Hint

Check the expression, threshold, and duration carefully.

Troubleshoot
advanced
2:00remaining
Diagnosing consumer lag despite low queue depth

You notice consumer lag is high but the queue depth is low. What could cause this?

AConsumers have received messages but are slow to acknowledge them, causing unacknowledged messages to pile up.
BThe RabbitMQ server is down, so no messages are processed.
CThe queue is set to auto-delete, so messages are lost immediately.
DThere are no consumers connected to the queue.
Attempts:
2 left
💡 Hint

Think about what unacknowledged messages mean.

🔀 Workflow
expert
3:00remaining
Designing an alert workflow for consumer lag and queue depth

Which sequence of steps correctly describes a workflow to alert on both queue depth and consumer lag in RabbitMQ?

A2,1,3,4
B3,1,2,4
C1,2,3,4
D1,3,2,4
Attempts:
2 left
💡 Hint

Think about the logical order from data collection to resolution.