tencent cloud

Creating a Namespace
Last updated:2025-12-24 14:59:00
Creating a Namespace
Last updated: 2025-12-24 14:59:00

Scenarios

Namespace is a resource management concept in TDMQ for Apache Pulsar. Different business scenarios of users can generally be isolated through namespaces, and special configurations can be set for different business scenarios, such as the message retention period. Topics, subscriptions, and role permissions in different namespaces are isolated from each other. A namespace serves as:
1. The smallest unit for traffic control and message storage policy adjustments. Such adjustments can only be made in batches when topics are categorized under a namespace.
2. The smallest unit for access control. A token can be granted read or write permissions to all topics under a specific namespace.

Constraints and Limitations

Within the same namespace, the names of topics and subscriptions are unique.
For TDMQ for Apache Pulsar clusters running version 2.6.1, a default namespace is automatically created with a 7-day message expiration time. It can be modified but not deleted.
If your newly created TDMQ for Apache Pulsar cluster runs version 2.7.1 or later, the system does not automatically create a default namespace.

Prerequisites

The corresponding cluster has been created.

Operation Steps

2. In the left sidebar, choose Namespace. After you select the region and cluster, click Create.
3. In the Create Namespace pop-up window, configure the relevant properties for the namespace:
Parameter
Required
Description
Namespace Name
Yes
Set the namespace name (which cannot be modified after creation). It cannot be empty. It can contain digits, letters, and characters "-_=:.". The length cannot exceed 128 characters.
Message TTL
Yes
Expiration time for unconsumed messages. If not acknowledged within the timeout period, the message will be skipped. It ranges from 60 seconds to 15 days.
Message Retention Policy
Yes
Persistent retention: Messages are persistently stored regardless of whether they have been consumed, based on the maximum retention period and storage space. Once the limit is reached, messages will be deleted based on the generation time in ascending order.
Maximum retention period: Messages are deleted after this period, calculated from when the message is produced to the topic. The retention policy applies only to acknowledged messages and does not affect unacknowledged messages. Unacknowledged messages are eligible for cleanup only after the Time to Live (TTL) expires. It ranges from 60 seconds to 15 days.
Maximum storage space: When the total size of all messages in the namespace reaches this limit, older messages are deleted in chronological order (from oldest to latest) based on their generation time. The minimum value is 10 GB. The configured capacity is allocated from the cluster's storage resources.
Consume-and-delete: Messages are asynchronously cleaned up within a certain period after being successfully acknowledged, saving storage space. If a topic has no subscriptions, this asynchronous cleanup applies immediately to newly generated messages.
Auto-Create Subscriptions
No
After enabling this feature, clients can auto-create subscriptions.
Description
No
Fill in the namespace description, which cannot exceed 128 characters.
4. Click Save to complete the creation.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback