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
ドキュメントTDMQ for RocketMQUse CasesMigration Guide for TencentCloud API Operations Related to RocketMQ 4.x Cluster Roles

Migration Guide for TencentCloud API Operations Related to RocketMQ 4.x Cluster Roles

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-01-23 17:36:45

Background

Due to historical reasons, certain TencentCloud API operations were shared among sub-products under the TDMQ product family. For example, some historical clusters of TDMQ for Apache Pulsar and TDMQ for RocketMQ shared role-related TencentCloud API operations. To achieve permission isolation at the finest granularity, TDMQ for RocketMQ introduced dedicated role management APIs. Customers who use these legacy shared TencentCloud API operations will be notified separately by TDMQ for RocketMQ.
This document guides customers on migrating legacy shared TencentCloud API operations. You may ignore this document if you do not use the legacy shared TencentCloud API operations listed below.

Related API Operations

Legacy Shared API Name
Description
New API
CreateRole
Creates a role.
CreateRocketMQRole
DeleteRoles
Deletes roles.
DeleteRocketMQRoles
DescribeRoles
Obtains a list of roles.
DescribeRocketMQRoles
ModifyRole
Modifies a role.
ModifyRocketMQRole
ModifyEnvironmentRole
Modifies an environment role for authorization.
ModifyRocketMQEnvironmentRole
CreateEnvironmentRole
Creates an environment role for authorization.
CreateRocketMQEnvironmentRole
DescribeEnvironmentRoles
Obtains a list of namespace roles.
DescribeRocketMQEnvironmentRoles
DeleteEnvironmentRoles
Deletes an environment role for authorization.
DeleteRocketMQEnvironmentRoles
DescribeMsgTrace
Queries the message trace.
DescribeRocketMQMsgTrace
ModifyVipInstanceState
Modifies the status of an exclusive instance.
ModifyRocketMQVipInstanceState
DescribeAppIdStats
Obtains the user information.
DescribeRocketMQAppIdStats

Migration Sample Code

Migration typically involves only changing the instantiated request object to the corresponding RocketMQ-specific object. The following example shows migrating from the CreateRole API to the CreateRocketMQRole API using the SDK in Java.

Legacy API Access

package com.tencent;

import com.tencentcloudapi.common.Credential; import com.tencentcloudapi.common.profile.ClientProfile; import com.tencentcloudapi.common.profile.HttpProfile; import com.tencentcloudapi.common.exception.TencentCloudSDKException; import com.tencentcloudapi.tdmq.v20200217.TdmqClient; import com.tencentcloudapi.tdmq.v20200217.models.*; public class Sample { public static void main(String [] args) { try{ // Instantiate an authentication object. Enter the SecretId and SecretKey of your Tencent Cloud account. Keep your key pair confidential. // You can obtain the key information at https://console.tencentcloud.com/cam/capi. Credential cred = new Credential("", ""); // Instantiate an HTTP option. This is optional and can be skipped if there are no special requirements. HttpProfile httpProfile = new HttpProfile(); // PolarisMesh is recommended. For related guidance, visit the following link: // https://git.woa.com/tencentcloud-internal/tencentcloud-sdk-java#%E5%8C%97%E6%9E%81%E6%98%9F httpProfile.setEndpoint("tdmq.ap-guangzhou.tencentcloudapi.woa.com"); // Instantiate a client option. This is optional and can be skipped if there are no special requirements. ClientProfile clientProfile = new ClientProfile(); clientProfile.setHttpProfile(httpProfile); // Instantiate the client object for the requested product. clientProfile is optional. TdmqClient client = new TdmqClient(cred, "", clientProfile); // Instantiate a request object. Each API corresponds to a request object. CreateRoleRequest req = new CreateRoleRequest(); // The returned resp is an instance of CreateRoleResponse, corresponding to the request object. CreateRoleResponse resp = client.CreateRole(req); // Output the response package in JSON string format. System.out.println(resp); } catch (TencentCloudSDKException e) { System.out.println(e.toString()); } } }

New API Access

package com.tencent; import com.tencentcloudapi.common.Credential; import com.tencentcloudapi.common.profile.ClientProfile; import com.tencentcloudapi.common.profile.HttpProfile; import com.tencentcloudapi.common.exception.TencentCloudSDKException; import com.tencentcloudapi.tdmq.v20200217.TdmqClient; import com.tencentcloudapi.tdmq.v20200217.models.*; public class Sample { public static void main(String [] args) { try{ // Instantiate an authentication object. Enter the SecretId and SecretKey of your Tencent Cloud account. Keep your key pair confidential. // You can obtain the key information at https://console.tencentcloud.com/cam/capi. Credential cred = new Credential("", ""); // Instantiate an HTTP option. This is optional and can be skipped if there are no special requirements. HttpProfile httpProfile = new HttpProfile(); // PolarisMesh is recommended. For related guidance, visit the following link: // https://git.woa.com/tencentcloud-internal/tencentcloud-sdk-java#%E5%8C%97%E6%9E%81%E6%98%9F httpProfile.setEndpoint("tdmq.ap-guangzhou.tencentcloudapi.woa.com"); // Instantiate a client option. This is optional and can be skipped if there are no special requirements. ClientProfile clientProfile = new ClientProfile(); clientProfile.setHttpProfile(httpProfile); // Instantiate the client object for the requested product. clientProfile is optional. TdmqClient client = new TdmqClient(cred, "", clientProfile); // Instantiate a request object. Each API corresponds to a request object. CreateRocketMQRoleRequest req = new CreateRocketMQRoleRequest(); // The returned resp is an instance of CreateRocketMQRoleResponse, corresponding to the request object. CreateRocketMQRoleResponse resp = client.CreateRocketMQRole(req); // Output the response package in JSON string format. System.out.println(resp); } catch (TencentCloudSDKException e) { System.out.println(e.toString()); } } }





ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック