What is the main purpose of using virtual hosts in RabbitMQ?
Think about how virtual hosts help organize and secure resources.
Virtual hosts provide logical separation within RabbitMQ, allowing different teams or applications to have isolated environments with their own permissions and resources.
What is the output of the command rabbitmqctl list_vhosts if there are two virtual hosts named dev and prod?
rabbitmqctl list_vhosts
The default virtual host is always listed as /.
The command lists all virtual hosts including the default one named /. The order usually shows / first, then others alphabetically.
Which command sequence correctly creates a virtual host named test_vhost and grants user tester full permissions on it?
Check the correct command names and the order of arguments for setting permissions.
The correct command to create a virtual host is add_vhost. The set_permissions command requires the -p flag to specify the virtual host, followed by the username and permission regex patterns.
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?
Access denied usually relates to permissions or existence of the virtual host.
If the virtual host exists and the server is running, the most common cause of access denied is missing or incorrect permissions for the user on that virtual host.
Arrange the steps in the correct order to isolate two applications AppA and AppB using RabbitMQ virtual hosts.
Think about creating resources before assigning permissions and configuring apps.
First create the virtual hosts, then create users, assign permissions, and finally configure the applications to connect properly.