RocketMQ Replicator Quick Start
$ git clone https://github.com/apache/rocketmq-externals.git
$ cd rocketmq-externals/rocketmq-replicator
$ mvn clean install -Prelease-all -DskipTest -U
### 出现如下信息,项目构建成功
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.432 s
[INFO] Finished at: 2019-10-11T14:08:41+08:00
[INFO] ------------------------------------------------------------------------
$ cd target
# 拷贝jar包到RocketMQ Runtime插件文件夹
$ cp rocketmq-replicator-0.1.0-SNAPSHOT-jar-with-dependencies.jar /usr/local/connectors-plugin/
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",
target-cluster":"{RocketMQCluster-Target}",
"source-cluster":"{RocketMQCluster-Source}",
"task-parallelism":"2",
"source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"
}
http://localhost:8081/connectors/replicator-test?config={
"connector-class":"org.apache.rocketmq.replicator.RmqSourceReplicator",
"source-rocketmq":"xxx.xxx.xxx.xxx:9876",
"target-rocketmq":"xxx.xxx.xxx.xxx:9876",
"replicator-store-topic":"replicatorTopic",
"taskDivideStrategy":"0",
"white-list":"fileTopic",
"task-parallelism":"4",
"target-cluster":"RocketMQCluster-xxx",
"source-cluster":"RocketMQCluster-xxx",
"source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter",
"topic.rename.format":"rename-${topic}"
}
http://${runtime-ip}:${runtime-port}/connectors/${replicator-name}/stop
http://localhost:8081/connectors/replicator-test/stop