Step 1. Create a new cluster
1. Log in to the RocketMQ console, enter the Cluster Management page, and select the target region. 2. Click Create Cluster, select the appropriate cluster specifications, and then click Buy Now to establish a new cluster.
See the following example value to quickly create a cluster. For the description of specific parameters, see Create Cluster. |
Cluster Version | 5.x |
Billing Mode | 5.x architecture clusters currently support pay-as-you-go and Monthly Subscription modes. |
Region | Select the region closest to your business. The private networks of cloud products in different regions are not interconnected, and the region cannot be changed after purchase. Please select carefully. For example, a CVM in the Guangzhou region cannot access a cluster in the Shanghai region through the private network. |
Deployment Mode | Keep default values. Support Single-AZ deployment and Multi-AZ deployment. For Multi-AZ deployment, two Availability Zones are available. |
Cluster Specifications | Basic Edition. Currently supported are Standard Edition, Professional Edition, and Platinum Edition. Different cluster types vary in performance specifications and features. For details, see Product Series. |
TPS specification | Keep default values. TPS specification includes the sum of production and consumption messages. Single messages are converted in 4KB units, and special types of messages are converted according to a specific ratio. |
Topic Count | Keep default values. |
Number of Group | The default ratio of Topic to Group is 1:10. |
Message retention Period | Keep default values. |
Virtual Private Cloud (VPC) | Authorize binding the newly purchased cluster access point domain name to the VPC. |
Public network access | Keep it disabled. Enabling public network bandwidth incurs an extra fee. You can disable it on the Cluster Management page after activation. |
Cluster Name | Enter cluster name, 3-64 characters, only comprised of digits, letters, "-", and "_". |
Tag | Optional. Tags categorize and manage resources from different dimensions. |
Agreement term | Check "I have read and agree to the TDMQ for RocketMQ terms of service". |
3. From the cluster list page, click the created cluster ID. In Access Information section of the cluster information page, you can view the access point details of the cluster.
Step 2. Configure cluster permissions
1. Click the "ID" of the created cluster in Step 1 to access the basic information page of the cluster. 2. Select the Cluster Permissions tab at the top of the page, click Add Role to create a role, and configure production and consumption permissions for it.
Note:
5.x clusters support closing the ACL switch on the Cluster Management page. However, to ensure the security of the customer's cluster, it will first verify if the customer's public network switch is on before closing the ACL switch. If it is on, you need to close the public network switch before closing the ACL permissions.
3. On the permission list page, get the AccessKey and SecretKey.
Step 3. Create a Topic
1. From the cluster permissions list page, select the Topic tab to access the Topic list page.
2. Click Create, enter a Topic name, select General message as the type, then click Submit to create a Topic.
Note:
This document describes the process of using general messages as an example, therefore, the created Topic following these steps for general messages cannot be used to send or receive messages of other types.
Step 4. Create a Group
1. From the Topic list page, select the Group tab at the top to access the Group list page.
2. Click Create, enter a Group name, leave the other settings at their defaults, then click Submit to create a Group.
Step 1. Creating a New Cluster and Getting Access Point Info
1. Log in to the RocketMQ console, enter the cluster management page, and select the target region. 2. Click Create Cluster, select the cluster specification, click Purchase Now, and create a cluster.
See the following example value to quickly create a cluster. For the description of specific parameters, see Create Cluster. |
Cluster Version | 4.x |
Cluster type | Exclusive cluster: exclusive physical resources, data security, almost unlimited usage. On-demand purchase by different node specifications. Generic cluster: exclusive physical resources, data security, almost unlimited usage. Sold by TPS range with fixed node specification. |
Billing Mode | Currently only supports monthly subscription - prepaid billing mode. |
Migrate to the cloud component | Disable |
Region | Select the region closest to your business. The private networks of cloud products in different regions are not interconnected, and the region cannot be changed after purchase. Please select carefully. For example, a Cloud Virtual Machine in the Guangzhou region cannot access a cluster in the Shanghai region through the private network. |
Deployment Mode | Keep default values. Support single-AZ deployment and multi-AZ deployment. For multi-AZ deployment, two Availability Zones are available. |
Cluster Specifications | Select different cluster specifications based on your business needs, or keep default values here. Exclusive clusters are sold by different node specifications. Generic clusters are sold by TPS range with fixed node specifications. |
Number of topics | Keep default values. |
Group count | The default ratio of Topic to Group is 1:10. |
Virtual Private Cloud (VPC) | Authorize binding the newly purchased cluster access point domain name to the VPC. |
Public network access | Keep it disabled. Enabling public network bandwidth will incur an extra fee. You can disable it on the Cluster Management page after activation. |
Cluster Name | Enter cluster name, 3-64 characters, only comprised of digits, letters, "-", and "_". |
Tag | Optional. Tags are used for resource classification management from different dimensions. |
Agreement term | Check "I have read and agree to" the "TDMQ for RocketMQ terms of service". |
3. On the cluster list page, click the ID of the created cluster. On the cluster basic information page, get cluster access point information in the access information module.
Step 2. Configuring Cluster Permissions
The steps for permission setting vary slightly between 4.x generic clusters and dedicated clusters. You can refer to the following tabs for details.
1. Click the "ID" of the created cluster in Step 1 to enter the cluster basic information page. 2. Select the role management tab at the top of the page, click add role, create a role, and configure production and consumption permissions for it.
3. On the permission list page, get the AccessKey and SecretKey.
Creating a Namespace
1. Click the "ID" of the created cluster in Step 1 to enter the cluster basic information page. 2. Select the namespace tab at the top, click Create, and set the namespace name and description. A namespace is created.
Creating a Role and Authorizing
1. On the cluster details page, select the role management tab, click add role to create a role.
2. On the role management list page, get the AccessKey and SecretKey.
3. Select the namespace tab above, find the namespace created, and click on the operation bar configure permissions.
4. On the permission configuration page, click add role to assign production and consumption permissions to the just created role.
Step 3. Create Topic
1. On the cluster details page, select the Topic tab to enter the topic list page.
2. Click Create, fill in the topic name, choose regular message as the message type, keep the default for other options, click Submit to create a Topic.
Notes:
This document takes the sending and receiving of normal messages as an example. Therefore, the normal message topic you created by referring to the above steps cannot be used to send and receive other types of messages.
Step 4. Creating a New Group
1. On the cluster details page, select the Group tab to enter the group list page.
2. Click Create, fill in Group name, choose TCP as the protocol type, keep the default for other options, click Submit to create a Group.
Note:
TDMQ for RocketMQ supports HTTP protocol and TCP protocol. Therefore, it is recommended to create Groups of the corresponding types for the two protocols respectively. If multiple consumers use the same Group to consume messages, with some using TCP protocol and others using HTTP protocol, it may lead to consumption failure, message duplication, or loss.