Virtual hosts (vhosts) are used to logically isolate resources. Each vhost manages its own exchanges, queues, and bindings. Applications can run on independent vhosts in a secure manner. This way, the business of an application is not affected by other applications. An instance can contain multiple vhosts, and a vhost can contain multiple exchanges and queues. You must specify a vhost before you connect a producer or consumer to ApsaraMQ for RabbitMQ.
Usage notes
Except for internal exchanges, you can delete a vhost only after all exchanges and queues in the vhost are deleted.
Create a vhost
Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.
In the left-side navigation pane, click vhosts.
On the vhosts page, click Create vhost.
In the Create vhost panel, enter a vhost name in the vhost Name field and click OK.
View the statistics of a vhost
You can view various metrics to identify and locate issues at the earliest opportunity.
In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.
In the left-side navigation pane, click vhosts.
On the vhosts page, find the vhost whose statistics you want to view and click Details in the Actions column.
On the vhost Details page, click the Monitoring and Alerting or Dashboard tab to view the statistics of the vhost.
The statistics of a vhost vary based on the instance edition. The following items describe the details:
Enterprise Edition and Enterprise Platinum Edition: You can view the metrics provided by Managed Service for Prometheus and Managed Service for Grafana. For information about the dashboard and metrics displayed on the dashboard, see Dashboard.
Standard Edition and Professional Edition: You can view the monitoring data provided by CloudMonitor. For information about metrics provided by CloudMonitor, see Monitoring and alerting.
NoteApsaraMQ for RabbitMQ no longer allows you to purchase Standard Edition instances. You can continue using existing Standard Edition instances.
View the information about the connection that is established to a vhost
After a vhost is created and the connection between the vhost and the client is established, you can view the connection details, including the IP address of the client, the connection status, the status of each channel of the connection, and the number of messages that are sent and received per minute.
In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.
In the left-side navigation pane, click vhosts.
On the vhosts page, find the vhost that you want to manage and choose in the Actions column. On the Connection Details tab of the vhost Details page, view the information about the connection that is established to the vhost.
You can also click the name of the vhost or click Details in the Actions column. On the Connection Details tab of the vhost Details page, view the information about the connection that is established to the vhost.
Table 1. Parameters on the Connection Details tab Parameter
Description
Connection
The IP address of the client.
Connection Name
The connection name that is defined on the client.
AccessKey ID
The AccessKey ID of your Alibaba Cloud account.
State
The status of the connection.
SSL/TLS
Indicates whether a Secure Sockets Layer (SSL) connection or Transport Layer Security (TLS) connection is enabled.
Protocol
The version of the Advanced Message Queuing Protocol (AMQP).
Delete a vhost
If you delete a vhost, all data in the vhost is deleted and cannot be restored. Proceed with caution.
In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.
In the left-side navigation pane, click vhosts.
On the vhosts page, find the vhost that you want to delete and choose in the Actions column.
In the Note message, click OK.