The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.
Help & Documentation>TDMQ for RabbitMQ

Vhost Management

Last updated: 2024-08-02 15:36:07

Operation scenarios

A virtual host (vhost) is a resource management concept in TDMQ for RabbitMQ. It is used for logical isolation, ensuring that exchanges and queues in different vhosts are isolated and do not interfere with each other.
Vhosts can be used to isolate different business scenarios and set specific configurations for each, such as message retention time.
This documentation guides you on using TDMQ for RabbitMQ by creating multiple vhosts, enabling you to apply it to different scenarios within the same cluster.
Notes:
Exchange and queue names within the same vhost must be unique.

Prerequisites

Cluster created.

Operation step

Create Vhost

1. Log in to RabbitMQ Console.
2. In the left navigation bar, select Cluster Management > Vhost, and click Create to enter the Create Vhost page.
3. In the Create Vhost dialog box, set the relevant attributes of the Vhost.
Vhost Name: Set the name of the vhost (cannot be modified after creation), 1-64 characters, only letters, numbers, '.', '-', and '_' are allowed
Trace Plugin: The rabbitmq_tracing plugin can track messages passing through RabbitMQ. Once enabled, you can use the console's message query capabilities.
Mirrored Queues: It is recommended to enable mirrored queues to ensure availability. Mirrored queues can replicate messages across multiple nodes in the RabbitMQ cluster, ensuring no message loss if a node fails. (Cannot be enabled in a single-node cluster.) For specific parameters, see Default Mirroring Policy.
Description: Remark description for the vhost
4. Click Submit to complete the creation of the Vhost in the cluster.

Next Steps: You can now create exchanges and queues within the vhost for message production and consumption.

View Vhost

On the Vhost List Page, click the ID of the vhost you want to view to enter the Basic Information Page.
Overview
Number of Queues: Displays the number of queues in the current vhost.
Number of Exchanges: Displays the number of exchanges in the current vhost.
Number of Channels: Displays the number of channels in the current vhost
Number of Users: Displays the number of users in the current vhost.
Accumulated Message Count: Displays the accumulated message count in the current vhost.
Production Rate: Displays the production rate in the current vhost.
Consumption Rate: Displays the consumption rate in the current vhost.
Connection List
Displays the connection status under the current vhost and the number of channels for each connection


Modify Vhost

The Trace Plugin Switch can be turned on or off on the Vhost List Page. It is recommended to use the Trace plugin in low-traffic verification/troubleshooting scenarios. It is not recommended to enable it when the cluster sends TPS over 10000. Please read Message Query.

If you need to modify the Vhost description again, you can follow these steps:
1. On the Vhost List Page, click Edit in the action column to enter the Editing Page.
2. Modify the description and click Submit to complete the modification.

Delete Vhost

If you want to delete a created vhost, you can follow these steps:
1. On the Vhost list page, click the delete in the operation column.
2. In the delete confirmation dialog box, click OK to delete the Vhost.
Note
After the Vhost is deleted, all resources under this Vhost will be cleared and cannot be recovered.