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

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-connect.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b8881f1 [ISSUE #444] update replicator quick start (#445)
1b8881f1 is described below

commit 1b8881f121aae2681c6d78aeceb9fcdcdf44f466
Author: zhoubo <[email protected]>
AuthorDate: Wed Mar 29 17:19:34 2023 +0800

    [ISSUE #444] update replicator quick start (#445)
    
    * update replicator quick start
    
    * add region,cloud param desc
---
 README.md                                |   7 ++-
 connectors/rocketmq-replicator/README.md | 103 +++++++++++++++++++------------
 2 files changed, 69 insertions(+), 41 deletions(-)

diff --git a/README.md b/README.md
index fd7044bb..89b7b2e3 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,14 @@
 # rocketmq-connect
 
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
 
-文档中心:[RocketMQ Connect](https://rocketmq-1.gitbook.io/rocketmq-connector/)
+文档中心
+
+[RocketMQ Connect 
文档](https://rocketmq.apache.org/zh/docs/connect/01RocketMQ%20Connect%20Overview/)
 
-架构简介:[RocketMQ Connect 
平台搭建与实践](https://developer.aliyun.com/search?q=rocketmq+connect&bizCategory=ucc-file)
 
 
 # 快速开始
 
-单机模式下[rocketmq-connect-sample](https://rocketmq-1.gitbook.io/rocketmq-connector/quick-start/file-connector)作为
 demo
+单机模式下rocketmq-connect-sample作为 demo
 
 rocketmq-connect-sample的主要作用是从源文件中读取数据发送到RocketMQ集群 然后从Topic中读取消息,写入到目标文件 
 
diff --git a/connectors/rocketmq-replicator/README.md 
b/connectors/rocketmq-replicator/README.md
index 16b01c5e..738cbdb9 100644
--- a/connectors/rocketmq-replicator/README.md
+++ b/connectors/rocketmq-replicator/README.md
@@ -1,69 +1,96 @@
 # rocketmq-replicator
 
-## rocketmq-replicator简介
+## rocketmq-replicator 简介
 
 
![image](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-Lm4-doAUYYZgDcb_Jnz%2F-LoOhyGfSf-N6oHVgJhr%2F-LoOi0ADfZ4q-qPo_uEB%2Frocketmq%20connector.png?alt=media&token=0bbbfa54-240a-489e-8dfb-1996d0800dfc)
 
-Replicator用于RocketMQ集群之间的信息同步,作为一个connector运行在RocketMQ Runtime上之上, 
能够同步两个独立的RocketMQ集群之间的消息。
+Replicator 用于 RocketMQ 集群之间的消息同步,实现跨集群消息路由,可以用在 RocketMQ 异地多活,容灾等场景。Replicator 
是在 RocketMQ Connect 框架基础上实现的,作为一个 connector 运行在 RocketMQ Connect 的 Runtime 中。
 
-## 中文文档
+## RocketMQ Connect 文档
 
-[Replicator文档](https://rocketmq-1.gitbook.io/rocketmq-connector/rocketmq-connector/replicator/replicator-jian-jie)
+[RocketMQ Connect 
文档](https://rocketmq.apache.org/zh/docs/connect/01RocketMQ%20Connect%20Overview/)
 
-[快速开始](https://rocketmq-1.gitbook.io/rocketmq-connector/rocketmq-connector/replicator/rocketmq-replicator)
+# Replicator 快速开始
 
 ---
 
-# replicator使用说明
 
 ## rocketmq-replicator打包
+
 ````
+cd ./rocketmq-connect/connectors/rocketmq-replicator
+
 mvn clean install -Prelease-all -DskipTest -U 
 ````
 
-打包成功后将`rocketmq-replicator-0.1.0-SNAPSHOT-jar-with-dependencies.jar`(fatjar)放到runtime配置的pluginPaths目录下
+打包成功后将` rocketmq-replicator-0.1.0-SNAPSHOT-jar-with-dependencies.jar 
`(./rocketmq-connect/connectors/rocketmq-replicator/target目录下)放到 runtime 配置的 
pluginPaths 目录下
+详细查看 [RocketMQ Connect 
快速开始](https://rocketmq.apache.org/zh/docs/connect/03RocketMQ%20Connect%20Quick%20Start)
 配置说明
 
 ## rocketmq-replicator启动
 
-同步topic和消息
+同步消息
 ````
-http://${runtime-ip}:${runtime-port}/connectors/${rocketmq-replicator-name}
-?config={"connector-class":"org.apache.rocketmq.replicator.RmqSourceReplicator","source-rocketmq":"xxxx:9876","target-rocketmq":"xxxxxxx:9876","replicator-store-topic":"replicatorTopic","taskDivideStrategy":"0","white-list":"TopicTest,TopicTest2","task-parallelism":"2","source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"}
+curl -X POST -H "Content-Type: application/json" 
http://${runtime-port}:${runtime-ip}/connectors/${replicator-name} -d '{
+    "connector.class": 
"org.apache.rocketmq.replicator.ReplicatorSourceConnector",
+    "src.endpoint": “${source-rocketmq-namesrv-endpoint}”,
+    "dest.acl.enable": "false",
+    "src.secret.key": “${sk}”,
+    "dest.topic": "${target-cluster-topic}",
+    "dest.access.key": “${ak}”,
+    "max.task": "2",
+    "src.topictags": "test1,*",
+    "src.acl.enable": "false",
+    "errors.tolerance": "all",
+    "dest.secret.key": “${sk}”,
+    "dest.endpoint": "${target-rocketmq-namesrv-endpoint}",
+    "src.access.key": “${ak}”,
+    "dest.cluster": "${targetDefaultCluster}",
+    "source.cluster": "${sourceDefaultCluster}",
+    "dest.region": "${regionA}",
+    "source.region": "${regionB}",
+    "dest.cloud": "${cloud1}",
+    "source.cloud": "${cloud2}"
+}'
 ````
-
-
-## rocketmq-replicator停止
+例如
 ````
-http://${runtime-ip}:${runtime-port}/connectors/${rocketmq-replicator-name}/stop
+curl -X POST -H "Content-Type: application/json" 
http://127.0.0.1:8082/connectors/test_replicator -d '{
+    "connector.class": 
"org.apache.rocketmq.replicator.ReplicatorSourceConnector",
+    "src.endpoint": “127.0.0.1:9876”,
+    "dest.topic": "test2",
+    "max.task": "2",
+    "src.topictags": "test1,*",
+    "src.acl.enable": "false",
+    "dest.endpoint": "127.0.0.1:9877"
+}'
 ````
 
-## rocketmq-meta-connector启动
-
-同步消费消费进度和ConsumerGroup
 
-注:此功能尚不成熟还需要后续版本优化
-````
-http://${runtime-ip}:${runtime-port}/connectors/${rocketmq-replicator-name}
-?config={"connector-class":"org.apache.rocketmq.replicator.RmqMetaReplicator","source-rocketmq":"xxxx:9876","target-rocketmq":"xxxxxxx:9876","replicator-store-topic":"replicatorTopic","offset.sync.topic":"syncTopic","taskDivideStrategy":"0","white-list":"TopicTest,TopicTest2","task-parallelism":"2","source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"}
-````
-
-
-## rocketmq-rocketmq-connector停止
+## rocketmq-replicator停止
 ````
-http://${runtime-ip}:${runtime-port}/connectors/${rocketmq-replicator-name}/stop
+curl 
http://${runtime-ip}:${runtime-port}/connectors/${rocketmq-replicator-name}/stop
 ````
 
 ## rocketmq-replicator参数说明
 
-parameter | type | must | description | sample value
----|---|---|---|---|
-source-rocketmq | String | Yes | namesrv address of source rocketmq cluster | 
192.168.1.2:9876 |
-target-rocketmq | String | Yes | namesrv address of target rocketmq cluster | 
192.168.1.2:9876 |
-target-cluster | String | Yes | target rocketmq cluster name | DefaultCluster |
-source-cluster | String | Yes | source rocketmq cluster name | DefaultCluster |
-replicator-store-topic | String | Yes | topic name to store all source 
messages | replicator-store-topic |
-task-divide-strategy | Integer | No | task dividing strategy, default value is 
0 for dividing by topic | 0 |
-white-list | String | Yes | topic white list and multiple fields are separated 
by commas | topic-1,topic-2 |
-task-parallelism | String | No | task parallelism,default value is 1,one task 
will be responsible for multiple topics for the value greater than 1 | 2 |
-source-record-converter | String | Yes | source data parser | 
io.openmessaging.connect.runtime.converter.JsonConverter |
-topic.rename.format | String | Yes | rename topic name rules | rename-${topic} 
(${topic} represents the source topic name) |
+parameter | type | must | description                                          
                                                                                
                                                                                
                                                                                
                                | sample value   
+---|---|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
+src.endpoint | String | Yes  | namesrv address of source rocketmq cluster      
                                                                                
                                                                                
                                                                                
                                     | 127.0.0.1:9876 |
+src.topictags | String | Yes  | source cluster topic and tag,${topic},{tag}    
                                                                                
                                                                                
                                                                                
                                      | test1,*        |
+dest.topic | String | Yes  | target cluster topic                              
                                                                                
                                                                                
                                                                                
                                   | test2          |
+dest.endpoint | String | Yes   | namesrv address of target rocketmq cluster    
                                                                                
                                                                                
                                                                                
                                       | 127.0.0.1:9876 |
+max.task | String | No   | maximum number of tasks                             
                                                                                
                                                                                
                                                                                
                                 | 2              |
+dest.acl.enable | String | No  | acl switch,enumeration value : true/false     
                                                                                
                                                                                
                                                                                
                                       | false          |
+dest.access.key | String | No  | please refer to the RocketMQ ACL module,when 
dest.acl.enable is false, this parameter does not take effect                   
                                                                                
                                                                                
                                        | accesskey      |
+dest.secret.key | String | No   | please refer to the RocketMQ ACL module,when 
dest.acl.enable is false, this parameter does not take effect                   
                                                                                
                                                                                
                                        | secretkey      |
+src.acl.enable | String | No  | acl switch,enumeration value : true/false      
                                                                                
                                                                                
                                                                                
                                      | true           |
+src.access.key | String | No  | please refer to the RocketMQ ACL module,when 
dest.acl.enable is false, this parameter does not take effect                   
                                                                                
                                                                                
                                        | accesskey      |
+src.secret.key | String | No   | please refer to the RocketMQ ACL module,when 
dest.acl.enable is false, this parameter does not take effect                   
                                                                                
                                                                                
                                        | secretkey      |
+errors.tolerance | String | No   | error tolerance  ,enumeration value : all . 
all means to tolerate all errors, the synchronization message failure will be 
skipped and error log will be printed. If there is no error tolerance 
configured, all errors will not be tolerated by default, a synchronization 
failure occurs, and the task will stop after multiple retries | all            |
+src.cluster | String | No   | source cluster                                   
                                                                                
                                                                                
                                                                                
                  | DefaultCluster |
+dest.cluster | String | No   | target cluster                                  
                                                                                
                                                                                
                                                                                
                       | DefaultCluster |
+src.region | String | No   | source region                                     
                                                                                
                                                                                
                                                                                
                             | regionA        |
+dest.region | String | No   | source region                                    
                                                                                
                                                                                
                                                                                
                              | regionB        |
+src.cloud | String | No   | source cloud                                       
                                                                                
                                                                                
                                                                                
                            | cloud1         |
+dest.cloud | String | No   | source cloud                                      
                                                                                
                                                                                
                                                                                
                             | cloud2         |
+                                                                               
                                                                                
                                                                                
                                       

Reply via email to