Virtual Hosts (vhosts) — Concept Check
Questions on Virtual Hosts (vhosts). vhosts provide logical namespacing within a single RabbitMQ instance; exchanges, queues, and bindings in one vhost are completely isolated from another.
Questions in this quiz
8 questions on Virtual Hosts (vhosts) — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A company uses RabbitMQ with multiple environments on a shared broker. They notice that messages meant for the development environment are appearing in the staging environment. What could be the cause?
- AThe RabbitMQ broker is misconfigured.
- BPermissions are not set correctly for the vhosts.
- CThe same vhost is used for both environments.
- DExchanges in both environments have the same name.
2.What happens if you set a policy with a max-length of 100,000 messages on a queue in a vhost?
- AThe oldest messages are deleted to make space.
- BNew messages are rejected when the limit is reached.
- CThe queue stops accepting new messages.
- DMessages are dropped when the limit is reached.
3.A developer configures a Spring Boot application to connect to a RabbitMQ vhost but receives an authentication error. What is a likely issue?
- AVhost does not exist on the server.
- BWrong port number in the configuration.
- CIncorrect vhost name in the URI.
- DRabbitMQ server is down.
4.In RabbitMQ, how are resources in different vhosts related?
- AThey share queues but not exchanges.
- BThey are partially isolated, sharing some configurations.
- CThey are completely isolated from each other.
- DThey share exchanges but not queues.
5.A team sets up two vhosts, /dev and /staging, with identical exchanges named 'orders'. What will occur when messages are published to these exchanges?
- AMessages will be duplicated across vhosts.
- BMessages will be routed to both exchanges.
- CMessages will be isolated to their respective vhosts.
- DMessages will be lost due to name collision.
6.Why might a RabbitMQ broker enforce a max-connections limit per vhost?
- ATo ensure high availability.
- BTo prevent unauthorized access.
- CTo balance load across servers.
- DTo avoid noisy-neighbour issues.
7.A service is unable to connect to a RabbitMQ vhost despite correct credentials. What might be the problem?
- AThe service is using an unsupported protocol.
- BThe vhost is not specified in the URI.
- CThe vhost permissions are not set for the user.
- DThe RabbitMQ version is outdated.
8.Which tool can be used to create a new vhost in RabbitMQ?
- Arabbitmqadmin
- Brabbitmq-server
- Crabbitmqctl
- Drabbitmq-plugin