tencent cloud

Feedback

Configuring TDMQ Connector

Last updated: 2024-07-23 15:08:07

    Overview

    You can configure a TDMQ connector to consume content in TDMQ message queues. A TDMQ connector is implemented in the pull pattern. It automatically pulls TDMQ content and routes events to relevant services through event rules. This document describes how to create a TDMQ connector and the structure of events generated by the TDMQ connector.
    Note
    Currently, a TDMQ connector can consume only content in TDMQ-Pulsar message queues.

    Prerequisites

    Directions

    1. Log in to the EventBridge console and click Event Bus in the left sidebar.
    2. In the Event Bus list, select the event bus for which you want to configure a TDMQ connector.
    3. On the Event bus details page, click Add in the Event connector section.
    
    4. In the Create event connector window, set parameters as prompted. Here, select Message queue (TDMQ) for Connector type** and set other parameters as prompted.
    5. Click OK.
    6. Click Event rule in the left sidebar.
    7. In the drop-down lists at the top of the Event rule page, select the same connector information as that set during connector creation and click Create event rule, as shown below:
    
    8. Set parameters as prompted, as shown below:
    
    Here, select Message queue (TDMQ) for Tencent Cloud service and configure the event target.
    9. Click OK.

    TDMQ connector data structure description

    {
    "specversion": "1.0",
    "id": "13a3f42d-7258-4ada-da6d-023a333b4662",
    "type": "connector:tdmq",
    "source": "tdmq.cloud.tencent",
    "subject": "qcs::tdmq:$region:$account:topicName/$topicSets.clusterId/$topicSets.environmentId/$topicSets.topicName/$topicSets.subscriptionName",
    "time": "1615430559146",
    "region": "ap-guangzhou",
    "datacontenttype": "application/json;charset=utf-8",
    "data": {
    "topic": "persistent://appid/namespace/topic-1",
    "tags": "testtopic",
    "TopicType": "0",
    "subscriptionName": "xxxxxx",
    "toTimestamp": "1603352765001",
    "partitions": "0",
    "msgId": "123345346",
    "msgBody": "Hello from TDMQ!"
    }
    }
    The parameters are described as follows:
    Parameter
    Description
    topic
    Complete topic path, such as persistent://appid/namespace/topic-1.
    tags
    TDMQ tags.
    topictype
    Topic type. Valid values:
    0: general message
    1: globally sequential message
    2: partitional sequential message
    3: retry letter topic
    4: dead letter topic
    subscriptionName
    Subscription name.
    timestamp
    Timestamp, which is accurate to milliseconds.
    partitions
    Partitions consumed by a TDMQ message queue.
    msgId
    TDMQ message ID.
    msgBody
    TDMQ message body.
    
    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