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.
You have created an event bus.
{
"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 tag. |
topictype | Topic type: |
subscriptionName | Subscription name. |
timestamp | Timestamp accurate down to the millisecond. |
partitions | TMDQ queue consumption partition. |
msgId | TDMQ message ID. |
msgBody | TDMQ message body. |
Was this page helpful?