tencent cloud

TDMQ for RocketMQ

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Introduction and Selection of the TDMQ Product Series
What Is TDMQ for RocketMQ
Strengths
Scenarios
Product Series
Comparison with Open-Source RocketMQ
High Availability
Quotas and Limits
Supported Regions
Basic Concepts
Billing
Billing Overview
Pricing
Billing Examples
Pay-as-you-go Switch to Monthly Subscription (5.x)
Renewal
Viewing Consumption Details
Refund
Overdue Payments
Getting Started
Getting Started Guide
Preparations
Step 1: Creating TDMQ for RocketMQ Resources
Step 2: Using the SDK to Send and Receive Messages (Recommended)
Step 2: Running the TDMQ for RocketMQ Client (Optional)
Step 3: Querying Messages
Step 4: Deleting Resources
User Guide
Usage Process Guide
Configuring Account Permissions
Creating the Cluster
Configuring the Namespace
Configuring the Topic
Configuring the Group
Connecting to the Cluster
Managing Messages
Managing the Cluster
Viewing Monitoring Data and Configuring Alarms
Cross-Cluster Message Replication
Use Cases
Naming Conventions for Common Concepts of TDMQ for RocketMQ
RocketMQ Client Use Cases
RocketMQ Performance Load Testing and Capacity Assessment
Access over HTTP
Client Risk Descriptions and Update Guide
Migration Guide for TencentCloud API Operations Related to RocketMQ 4.x Cluster Roles
Migration Guide
Disruptive Migration
Seamless Migration
Developer Guide
Message Types
Message Filtering
Message Retries
POP Consumption Mode (5.x)
Clustering Consumption and Broadcasting Consumption
Subscription Relationship Consistency
Traffic Throttling
​​API Reference(5.x)
History
API Category
Making API Requests
Topic APIs
Consumer Group APIs
Message APIs
Role Authentication APIs
Hitless Migration APIs
Cloud Migration APIs
Cluster APIs
Data Types
Error Codes
​​API Reference(4.x)
SDK Reference
SDK Overview
5.x SDK
4.x SDK
Security and Compliance
Permission Management
CloudAudit
Deletion Protection
FAQs
4.x Instance FAQs
Agreements
TDMQ for RocketMQ Service Level Agreement
Contact Us
DocumentationTDMQ for RocketMQUse CasesNaming Conventions for Common Concepts of TDMQ for RocketMQ

Naming Conventions for Common Concepts of TDMQ for RocketMQ

PDF
Focus Mode
Font Size
Last updated: 2026-01-23 17:36:45
This document introduces the naming conventions and usage guidelines for common concepts of TDMQ for RocketMQ.

Naming Conventions

topic

The name cannot be empty and can contain only letters, digits, percent signs (%), hyphens (-), and underscores (_). It must be 3 to 100 characters in length.
Recommended format: String.format("tp_%s_%s","System name","Business name").
Example: tp_order_check.

tag

The name cannot be empty and can be any string. It is used for secondary message filtering under a topic.
Recommended format: String.format("tag_%s","Business action or category").
Example: Tag + Business action. For example, the tag for order creation can be tag_create, and the tag for order closing can be tag_close.

keys

The name cannot be empty. Setting is recommended. It can be a string or an array of strings. It is used for querying messages or message traces in the console.
Recommended format: String.format("%s","Unique business ID").
Examples: unique IDs such as order ID, transaction ID, serial number, and TraceID.

producer group

The name cannot be empty. It must be 3 to 64 characters in length and can contain only letters, digits, hyphens (-), and underscores (_).
Recommended format: String.format("pg_%s_%s","System name","Business name").
Example: pg_transfer_check.

consumer group

The name cannot be empty. It must be 3 to 64 characters in length and can contain only letters, digits, hyphens (-), and underscores (_).
Recommended format: String.format("cg_%s_%s","System name","Business name").
Example: cg_transfer_check.

role

The name cannot be empty. It can contain only digits, letters, hyphens (-), and underscores (_), and cannot exceed 32 characters in length.
A role represents a marker for read/write permissions in different business scenarios. Recommended format: Business name + send/consume.
Examples: role_order_send, role_order_consume, and role_order_all.

clientId

clientId represents a client instance ID and must be unique across different clients. It cannot be set directly on the client. instanceName is an optional component of the clientId and can be adjusted to modify the clientId.
Classification
Generation Policy
Producer
${Current IP address}@${instanceName}
Cluster consumer
${Current IP address}@${instanceName}
Broadcast consumer
${Current IP address}@${instanceName}

public String buildMQClientId() { StringBuilder sb = new StringBuilder(); sb.append(this.getClientIP()); sb.append("@"); sb.append(this.getInstanceName()); if (!UtilAll.isBlank(this.unitName)) { sb.append("@"); sb.append(this.unitName); } if (enableStreamRequestType) { sb.append("@"); sb.append(RequestType.STREAM); } return sb.toString(); }

instanceName

Instance name. By default, you do not need to set an instance name. The system randomly generates a unique value by default using the following code.
public void changeInstanceNameToPID() { if (this.instanceName.equals("DEFAULT")) { this.instanceName = UtilAll.getPid() + "#" + System.nanoTime(); } }
Broadcast consumers should keep the consumer instance name unchanged upon each startup and read the local offset file on the client. The instance name should be explicitly set. For broadcasting consumption, the current client IP address should remain consistent before and after startup. In container deployments, fixed pod IP scheduling should be configured. Otherwise, broadcast messages during restarts may result in missed consumption.
Recommended format: String.format("instance-%s-%s","System name","Business name").

Usage Guidelines

Producers

Mandatory: Use only one topic per domain service.
Mandatory: Set the tag based on the business action when you send messages for a domain service.
Mandatory: Set the keys field when you send messages on the producer.
Mandatory: Print message logs regardless of whether the message sending succeeds or fails, and make sure that the SendResult and key fields are included.
Recommended: Store failed messages in a database after sending failures, and then use timer-based threads for scheduled retries to ensure that messages reach the broker.
Recommended: Use one-way messages for business scenarios with low reliability requirements.
Mandatory: Specify a producer group when you create a producer.

Consumers

Mandatory: Specify a consumer group when you create a consumer.
Mandatory: Implement idempotency logic at the business level, as the consumer cannot avoid message duplication.
Recommended: Start multiple consumer instances within the same consumer group to increase consumption parallelism, or modify consumeThreadMin and consumeThreadMax to enhance the parallel consumption capability of a single consumer.
Recommended: Set the consumeMessageBatchMaxSize parameter of the consumer to enable batch consumption of messages and achieve higher throughput.
Recommended: Discard less important messages when you deal with message backlogs, if business data requirements permit.
Recommended: If the message volume is low, print message details and consumption duration at the consumption entry to facilitate subsequent troubleshooting.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback