Scenarios
Namespace is a resource management concept in TDMQ for RocketMQ 4.x virtual clusters and exclusive clusters. Different business scenarios of users can generally be isolated through namespaces, and special configurations can be set for different business scenarios. Topics, subscriptions, and role permissions in different namespaces are isolated from each other.
This document describes how to create multiple namespaces in TDMQ for RocketMQ so that you can apply TDMQ for RocketMQ to different scenarios in the same cluster.
Constraints and Limitations
Namespaces only need to be created for 4.x virtual clusters and exclusive clusters. Namespaces do not need to be created for 5.x clusters or 4.x exclusive clusters.
Up to 10 namespaces can be created under each cluster.
The names of topics and groups in the same namespace are unique.
After a message is produced successfully, it is retained on the server for 3 days by default. Regardless of whether it is consumed, it is automatically deleted upon expiration. For exclusive clusters, you can submit a ticket to adjust the message retention time. Operation Steps
Creating a Namespace
1. Log in to the TDMQ for RocketMQ console, select a region, and click the ID of the target cluster to go to the Basic Information page. 2. Select the Namespace tab at the top of the page, and click Create to go to the namespace creation page.
3. In the namespace creation dialog box, configure the relevant properties for the namespace.
Namespace Name: sets the name of a namespace (which cannot be modified after creation). The name must be 3 to 32 characters in length and can contain only letters, digits, and underscores (_).
Namespace Description: remarks or notes on the namespace.
4. Click Submit to complete the creation of the namespace within the cluster.
Follow-up steps: You can then produce and consume messages on Topic Management of this namespace. Obtaining the Access Address
On the Namespace page, you can view the TCP access addresses for the namespace in the VPC Network Access Address and Public Network Access Address columns in the namespace list. For HTTP access points, go to the cluster basic information page.
Modifying the Namespace
To modify or edit a namespace again, follow the steps below:
1. On the Namespace page, click Edit in the operation column of a namespace in the namespace list to go to the editing page.
2. Modify the namespace description, and click Submit to complete the modification.
Deleting the Namespace
To delete a created namespace, follow the steps below:
1. On the Namespace page, click Delete in the operation column of a namespace in the namespace list.
2. In the displayed dialog box, click Delete to delete the namespace.
Note:
To prevent user misoperations from causing cluster data loss (such as topics and groups), the console verifies the resources within a namespace when the namespace is deleted. If any resources remain undeleted, such as topics or groups, the namespace cannot be deleted.
Before deleting a namespace, delete all topics and groups within it. Namespaces can be deleted in batches in the console. Before a namespace is deleted, you also need to delete the roles bound to the namespace. On the Namespace page, click Configure Permission in the operation column of a namespace in the namespace list.
On the permission configuration page, click Delete to unbind the two. Then, you can go to the namespace page again to delete the namespace.