You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by sh...@apache.org on 2023/06/13 04:01:45 UTC

[rocketmq-eventbridge] 04/04: feat:add runtime demo.

This is an automated email from the ASF dual-hosted git repository.

shenlin pushed a commit to branch runtimer
in repository https://gitbox.apache.org/repos/asf/rocketmq-eventbridge.git

commit b2ee9b25bc3fd1cb1cb89b1499aa9d30d0f40511
Author: 2011shenlin <20...@gmail.com>
AuthorDate: Mon Jun 12 15:48:21 2023 +0800

    feat:add runtime demo.
---
 .../migration/V5__register_target_acs_dingtalk.sql | 22 +++++++++++-
 .../V6__register_target_acs_eventbridge.sql        | 41 +++++++++++++++++++++-
 2 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql b/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
index 1d8a643..d9f0df9 100644
--- a/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
+++ b/adapter/persistence/src/main/resources/db/migration/V5__register_target_acs_dingtalk.sql
@@ -17,4 +17,24 @@
 
 INSERT INTO `event_target_class` (`name`,`api_params`,`target_transform`,`required_params`,`visual_config`,`description`,`gmt_create`,`gmt_modify`)
 VALUES
-('acs.dingtalk','{\n    \"WebHook\":{\n        \"type\":\"String\",\n        \"desc\":\"the endpoint of webhook.\",\n        \"required\":true\n    },\n    \"SecretKey\":{\n        \"type\":\"String\",\n        \"desc\":\"the secret key.\",\n        \"required\":true\n    },\n    \"Body\":{\n        \"type\":\"boolean\",\n        \"desc\":\"the content of request\"\n    }\n}','{     \"data\":\"${Body}\" }','{\n    \"webHook\":\"${WebHook}\",\n    \"secretKey\":\"${SecretKey}\",\n    \"cl [...]
\ No newline at end of file
+('acs.dingtalk','{
+                     "WebHook":{
+                         "type":"String",
+                         "desc":"the endpoint of webhook.",
+                         "required":true
+                     },
+                     "SecretKey":{
+                         "type":"String",
+                         "desc":"the secret key.",
+                         "required":true
+                     },
+                     "Body":{
+                         "type":"boolean",
+                         "desc":"the content of request"
+                     }
+                 }','{"data":"${Body}" }'
+                 ,'{
+                       "webHook":"${WebHook}",
+                       "secretKey":"${SecretKey}",
+                       "class":"org.apache.rocketmq.connect.dingtalk.sink.DingTalkSinkConnector"
+                   }',NULL,'aliyun dingtalk connector config',now(),now());
\ No newline at end of file
diff --git a/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql b/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
index b7587a0..fd24d5d 100644
--- a/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
+++ b/adapter/persistence/src/main/resources/db/migration/V6__register_target_acs_eventbridge.sql
@@ -17,4 +17,43 @@
 
 INSERT INTO `event_target_class` (`name`,`api_params`,`target_transform`,`required_params`,`visual_config`,`description`,`gmt_create`,`gmt_modify`)
 VALUES
-('acs.eventbridge','{\n    \"RegionId\":{\n        \"type\":\"String\",\n        \"desc\":\"the region of aliyun eventbridge.\",\n        \"required\":true\n    },\n    \"AliyunAccountId\":{\n        \"type\":\"String\",\n        \"desc\":\"the account id of aliyun eventbridge.\",\n        \"required\":true\n    },\n    \"AliyunEventBus\":{\n        \"type\":\"String\",\n        \"desc\":\"the bus of aliyun eventbridge.\",\n        \"required\":true\n    },\n    \"AccessKeyId\":{\n       [...]
+('acs.eventbridge','{
+        "RegionId":{
+            "type":"String",
+            "desc":"the region of aliyun eventbridge.",
+            "required":true
+        },
+        "AliyunAccountId":{
+            "type":"String",
+            "desc":"the account id of aliyun eventbridge.",
+            "required":true
+        },
+        "AliyunEventBus":{
+            "type":"String",
+            "desc":"the bus of aliyun eventbridge.",
+            "required":true
+        },
+        "AccessKeyId":{
+            "type":"String",
+            "desc":"the accessKeyId of aliyun eventbridge.",
+            "required":true
+        },
+        "AccessKeySecret":{
+            "type":"String",
+            "desc":"the accessKeySecret of aliyun eventbridge.",
+            "required":true
+        }
+    }','{
+    "data":"{\"form\":\"JSONPATH\",\"value\":\"$.data\"}",
+    "id":"{\"form\":\"JSONPATH\",\"value\":\"$.id\"}",
+    "type":"{\"form\":\"JSONPATH\",\"value\":\"$.type\"}",
+    "specversion":"{\"form\":\"JSONPATH\",\"value\":\"$. specversion\"}",
+    "subject":"{\"form\":\"JSONPATH\",\"value\":\"$.subject\"}",
+    "source":"{\"form\":\"JSONPATH\",\"value\":\"$.source\"}"
+}','{
+       "aliyuneventbusname":"${AliyunEventBus}",
+       "accessKeyId":"${AccessKeyId}",
+       "accessKeySecret":"${AccessKeySecret}",
+       "accountEndpoint":"${AliyunAccountId}.eventbridge.${RegionId}.aliyuncs.com",
+       "class":"org.apache.rocketmq.connect.eventbridge.sink.EventBridgeSinkConnector"
+   }',NULL,'aliyun eventbridge connector config',now(),now());