Overview
Namespace is a resource management concept in TDMQ for RocketMQ 4.x virtual clusters and dedicated clusters. It can generally be used to isolate different businesses via customized configurations such as message retention period. Topics, subscriptions, and role permissions in one namespace are all kept separate from those in another.
This document describes how to create multiple namespaces in TDMQ for RocketMQ to use the same TDMQ for RocketMQ cluster in different scenarios.
Note:
A maximum of 10 namespaces can be created in each cluster.
The names of topics and groups under the same namespace are unique.
After a message is successfully produced, it is retained on the server for 3 days by default and automatically deleted upon expiration, whether consumed or not. For dedicated clusters, you can submit a ticket to apply for an adjustment to the message retention period. Directions
Creating a namespace
1. Log in to the RocketMQ console, select the region, and click the ID of the target cluster to enter the Basic Info page. 2. Select the Namespace tab at the top of the page and click Create to enter the namespace creation page.
3. In the Create Namespace window, configure the namespace attributes:
Namespace Name: Enter the namespace name, which cannot be modified after creation and can contain 3–32 letters, digits, backslashes, and underscores.
Namespace Description: Enter the remarks of the namespace.
4. Click Submit to complete the creation of the namespace within the cluster.
After the above steps, you can create a topic in the namespace to produce and consume messages as instructed in Topic Management. Getting the access address
On the Namespace list page, you can get the namespace access addresses for TCP in the VPC Access Address and Public Network Access Address columns. You can view the HTTP access point on the Basic Info of the cluster.
Modifying a namespace
You can modify a namespace in the following steps:
1. On the Namespace list page, click Edit in the Operation column of the target namespace to enter the editing page.
2. Modify the namespace description, and click Save to complete the modification.
Deleting a namespace
You can delete a created namespace in the following steps:
1. On the Namespace list page, click Delete in the Operation column of the target namespace.
2. In the deletion confirmation pop-up window, click OK.
Notes:
To avoid user misoperation leading to data in the internal of cluster (such as Topic and Group), the console will verify resources in namespace before deletion. If any resource not deleted exists (for example, Topic or Group not deleted), the namespace cannot be deleted.
When deleting a namespace, please first delete the Topics and Groups within it. Currently, batch deletion is supported in the console. Before deleting a namespace, you also need to remove its role binding. On the namespace list page, click Configure Permissions.
After entering the permission configuration page, click Delete to unbind both, then go to the namespace page again to delete the namespace.