tencent cloud

Feedback

Resource Creation and Preparation

Last updated: 2023-09-12 16:08:15

    Overview

    Before using SDK to send and receive messages over TCP, you need to create resources such as clusters and topics in the TDMQ for RocketMQ console, and configure related resource information when running the client.

    Prerequisites

    You have signed up for a Tencent Cloud account as instructed in Signing Up.

    Directions

    Step 1. Create a cluster

    1. Log in to the TDMQ console, enter the Cluster page, and select the target region.
    2. Click Create Cluster and select Virtual cluster. Then, enter the cluster name and description, and click OK to create a cluster.
    
    3. On the cluster list page, click the ID of the cluster you just created. In the network module of the cluster's basic information page, you can view the access point information of the cluster.
    

    Step 2. Create a namespace

    1. On the Cluster list page, click the ID of the cluster created in Step 1 to enter the cluster's basic information page.
    2. Select the Namespace tab at the top, click Create, and set the namespace name and description to create a namespace.
    

    Step 3. Create a role and configure permissions

    1. Select Role Management on the left sidebar and click Create to create a role.
    2. On the Cluster page, click the ID of the cluster you just created in step 1 to enter the cluster details page.
    3. Select the Namespace tab at the top and click Configure Permissions in the Operation column of the namespace you just created.
    4. On the Configure Permission page, click Add Role to add production and consumption permissions to the role you just created.
    

    Step 4. Create a topic

    1. On the Namespace list page, select the Topic tab at the top to enter the Topic list page.
    2. Select the namespace created in Step 3 and click Create. Then, enter the topic name, select General message as the message type, and click OK to create a topic.
    Note
    This document takes sending and receiving general messages as an example. Therefore, the topic of general messages created by referring to the above steps cannot be used for messages of other types.
    

    Step 5. Create a group

    1. On the Topic list page, select the Group tab at the top to enter the Group list page.
    2. Select the namespace you just created and click Create. Then, enter the group name, select TCP as the protocol type, and click OK to create a group.
    Note
    TDMQ for RocketMQ supports the TCP and HTTP protocols. Therefore, we recommend that you create corresponding types of groups for these two protocols. If multiple consumers use the same group to consume messages, with some using the TCP protocol and others using the HTTP protocol, this may result in consumption failure and message repetition or loss.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support