0
0
RabbitMQdevops~20 mins

Mirrored queues for redundancy in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Mirrored Queue Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
Understanding Mirrored Queues in RabbitMQ

What is the primary purpose of using mirrored queues in RabbitMQ?

ATo increase message throughput by parallel processing
BTo replicate messages across multiple nodes for high availability
CTo encrypt messages during transmission
DTo compress messages to save storage space
Attempts:
2 left
💡 Hint

Think about what redundancy means in message queuing.

💻 Command Output
intermediate
1:30remaining
Check Mirrored Queue Status

What is the output of the following RabbitMQ command when checking the status of a mirrored queue named task_queue?

rabbitmqctl list_queues name policy
AError: queue not found
Btask_queue lazy
Ctask_queue none
Dtask_queue all
Attempts:
2 left
💡 Hint

Mirrored queues use the all policy by default.

Configuration
advanced
2:00remaining
Configuring a Mirrored Queue Policy

Which of the following commands correctly sets a policy to mirror all queues on all nodes in RabbitMQ?

Arabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}'
Brabbitmqctl set_policy ha-all ".*" '{"ha-mode":"nodes"}'
Crabbitmqctl set_policy ha-all ".*" '{"ha-mode":"lazy"}'
Drabbitmqctl set_policy ha-all ".*" '{"ha-mode":"exactly", "ha-params":2}'
Attempts:
2 left
💡 Hint

The ha-mode must be set to all to mirror on all nodes.

Troubleshoot
advanced
1:30remaining
Troubleshooting Mirrored Queue Failover

You notice that after a node failure, messages are lost from a mirrored queue. Which of the following is the most likely cause?

AThe RabbitMQ service was restarted on all nodes simultaneously
BThe queue was not configured with a mirrored policy
CThe messages were published with <code>delivery_mode=1</code> (non-persistent)
DThe consumers were not connected to the master node
Attempts:
2 left
💡 Hint

Consider message durability and persistence in RabbitMQ.

🔀 Workflow
expert
2:30remaining
Steps to Create and Verify a Mirrored Queue

Arrange the steps in the correct order to create a mirrored queue named logs and verify its mirroring status in RabbitMQ.

A1,2,3,4
B2,1,4,3
C1,2,4,3
D2,4,1,3
Attempts:
2 left
💡 Hint

Policies must be set before queue declaration to apply mirroring.