Bird
0
0

Which command correctly sets a policy to mirror all queues in RabbitMQ?

easy📝 Configuration Q12 of 15
RabbitMQ - Clustering
Which command correctly sets a policy to mirror all queues in RabbitMQ?
Arabbitmqctl set_policy ha-all .* '{"ha-mode":"all"}'
Brabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}'
Crabbitmqctl set_policy ha-all ".*" '{ha-mode:all}'
Drabbitmqctl set_policy ha-all ".*" '{"ha-mode":all}'
Step-by-Step Solution
Solution:
  1. Step 1: Review correct syntax for set_policy

    The command requires the policy name, pattern in quotes, and JSON string with keys and values in double quotes.
  2. Step 2: Identify correct JSON format and quoting

    rabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}' uses correct JSON with double quotes around keys and values and quotes the pattern ".*" properly.
  3. Final Answer:

    rabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}' -> Option B
  4. Quick Check:

    Correct JSON and quoting = rabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}' [OK]
Quick Trick: Use double quotes inside JSON and quote pattern with ".*" [OK]
Common Mistakes:
MISTAKES
  • Missing quotes around JSON keys or values
  • Not quoting the pattern string
  • Using single quotes inside JSON instead of double quotes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More RabbitMQ Quizzes