0
0
RabbitMQdevops~20 mins

Virtual hosts for isolation in RabbitMQ - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RabbitMQ Virtual Host Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of Virtual Hosts in RabbitMQ

What is the main purpose of using virtual hosts in RabbitMQ?

ATo automatically backup messages to external storage
BTo increase the number of queues in a single RabbitMQ instance
CTo speed up message delivery between producers and consumers
DTo isolate different environments and control access separately
Attempts:
2 left
💡 Hint

Think about how virtual hosts help organize and secure resources.

💻 Command Output
intermediate
2:00remaining
Listing Virtual Hosts Output

What is the output of the command rabbitmqctl list_vhosts if there are two virtual hosts named dev and prod?

RabbitMQ
rabbitmqctl list_vhosts
A
/
dev
prod
B
dev
prod
C
/
prod
dev
D
prod
dev
/
Attempts:
2 left
💡 Hint

The default virtual host is always listed as /.

Configuration
advanced
3:00remaining
Creating a Virtual Host with Permissions

Which command sequence correctly creates a virtual host named test_vhost and grants user tester full permissions on it?

A
rabbitmqctl create_vhost test_vhost
rabbitmqctl set_permissions -p tester test_vhost ".*" ".*" ".*"
B
rabbitmqctl create_vhost test_vhost
rabbitmqctl set_permissions tester test_vhost ".*" ".*" ".*"
C
rabbitmqctl add_vhost test_vhost
rabbitmqctl set_permissions -p test_vhost tester ".*" ".*" ".*"
D
rabbitmqctl add_vhost test_vhost
rabbitmqctl set_permissions tester ".*" ".*" ".*"
Attempts:
2 left
💡 Hint

Check the correct command names and the order of arguments for setting permissions.

Troubleshoot
advanced
2:30remaining
Access Denied Error on Virtual Host

A user appuser tries to connect to RabbitMQ on virtual host app_vhost but gets an access denied error. Which is the most likely cause?

AThe user <code>appuser</code> does not have permissions set for <code>app_vhost</code>
BThe virtual host <code>app_vhost</code> does not exist
CThe RabbitMQ server is down
DThe user password is expired
Attempts:
2 left
💡 Hint

Access denied usually relates to permissions or existence of the virtual host.

🔀 Workflow
expert
3:00remaining
Sequence to Isolate Applications Using Virtual Hosts

Arrange the steps in the correct order to isolate two applications AppA and AppB using RabbitMQ virtual hosts.

A2,1,3,4
B1,2,3,4
C1,3,2,4
D2,3,1,4
Attempts:
2 left
💡 Hint

Think about creating resources before assigning permissions and configuring apps.