{"specversion": "1.0","id": "13a3f42d-7258-4ada-da6d-023a333b4662","type": "cos:created:object","source": "cos.cloud.tencent","subject": "qcs::cos:ap-guangzhou:uid1250000000:bucketname","time": "1615430559146","region": "ap-guangzhou","datacontenttype": "application/json;charset=utf-8","resource": ["qcs::eb:ap-guangzhou:uid1250000000:eventbusid/eventruleid"],"data": {"name": "testname","scope": 100}}
{"data": {"name": ["testname"]}}
{"data": {"name": ["testname","test"]}}
{"specversion": "1.0","id": "13a3f42d-7258-4ada-da6d-023a333b4662","type": "cos:created:object","source": "cos.cloud.tencent","subject": "qcs::cos:ap-guangzhou:uid1250000000:bucketname","time": "1615430559146","region": "ap-guangzhou","datacontenttype": "application/json;charset=utf-8","resource": ["qcs::eb:ap-guangzhou:uid1250000000:eventbusid/eventruleid"],"data": {"name": "testname","scope": 100}}
{"data":{"name":[{"prefix":"te"}]}}
{"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!"}}
{"data": {"topic": [{"suffix":"/topic-1"}]}}
{"specversion":"1.0","id":"13a3f42d-7258-4ada-da6d-023a333b4662","type":"cos:created:object","source":"cos.cloud.tencent","subject":"qcs::cos:ap-guangzhou:uid1250000000:bucketname","time":"1615430559146","region":"ap-guangzhou","datacontenttype": "application/json;charset=utf-8","resource":["qcs::eb:ap-guangzhou:uid1250000000:eventbusid/eventruleid"],"data":{"name":"testname","scope":100}}
{"data": {"name": [{"anything-but":"test1"}]}}
{"data": {"name": [{"anything-but":"testname"}]}}
{"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!"}}
{"data": {"topic": [{"contain":"topic-1"}]}}
{"data": {"topic": [{"contain":["topic-1","appid"]}]}}
{"array": "{\\"key1\\":\\"value1\\"}"}。
典型场景如要根据产品属性 data 结构中的某个字段生成事件规则,以数据订阅 DTS 数据为例,接收到的事件如下:{"id": "13a3f42d-7258-4ada-da6d-023a33******","type": "dts:mysql:update","specversion": "1.0","source": "dts.cloud.tencent","subject": "cdb-xxx","time": 1660013278609,"region": "ap-guangzhou","dataContentType": "application/json;charset=utf-8","tags": {"key1": "value1","key2": "value2"},"data": {"topic": "topic-subs-xxx-cdb-xxx","partition": 0,"offset": 72235,"partition_seq": 72236,"event": {"dmlEvent": {"dmlEventType": 1,"columns": [{"name": "time","originalType": "time"},{"name": "id","originalType": "int(11)","isKey": true}],"rows": [{"oldColumns": [{"dataType": 13,"charset": "utf8","bv": "c3NzYWFhcWFxMTEx"}],"newColumns": [{"dataType": 13,"charset": "utf8","bv": "MjA6MTI6MjI="}]}]}},"header": {"sourceType": 1,"messageType": 2,"timestamp": 1648555949,"serverId": 109741,"fileName": "mysql-bin.000005","position": 11172920,"gtid": "38cecd93-a9c2-11ec-b952-043f72d8da53:55","schemaName": "dts","tableName": "dts_mysql","seqId": 72286,"isLast": true},"eb_consumer_time": "2022-03-29T20:12:29+08:00","eb_connector": "cdb-xxx"}}
columns 字段进行规则匹配,可以被正常触发的规则如下:{"source": "dts.cloud.tencent","type": "dts:mysql:update","data": {"event": {"dmlEvent": {"columns": [{"array": "{\\"name\\":\\"time\\"}"}]}}}}
{"source": "dts.cloud.tencent","type": "dts:mysql:update","data": {"event": {"dmlEvent": {"columns": [{"array": "{\\"name\\":\\"id\\",\\"originalType\\":\\"int(11)\\"}"}]}}}}
{"specversion": "1.0","id": "13a3f42d-7258-4ada-da6d-023a333b4662","type": "cos:created:object","source": "cos.cloud.tencent","subject": "qcs::cos:ap-guangzhou:uid1250000000:bucketname","time": "1615430559146","region": "ap-guangzhou","datacontenttype": "application/json;charset=utf-8","resource": ["qcs::eb:ap-guangzhou:uid1250000000:eventbusid/eventruleid"],"data": {"name": "testname","scope": 100,"source-ip": "10.0.0.123"}}
{"data": {"source-ip": [{"cidr": "10.0.0.0/24"}]}}
{"data": {"name": [{"anything-but": {"prefix": "init"}}]}}
{"data": {"topic": [{"prefix":"pre"},{"suffix":"suf"}]}}
文档反馈