mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Modify canal-client config and polish consumer implementation
This commit is contained in:
@@ -26,6 +26,7 @@ public class CanalAdapterRocketMQWorker extends AbstractCanalAdapterWorker {
|
||||
|
||||
public CanalAdapterRocketMQWorker(String nameServers, String topic, String groupId,
|
||||
List<List<CanalOuterAdapter>> canalOuterAdapters) {
|
||||
logger.info("RocketMQ consumer config topic:{}, nameServer:{}, groupId:{}", topic, nameServers, groupId);
|
||||
this.canalOuterAdapters = canalOuterAdapters;
|
||||
this.groupInnerExecutorService = Executors.newFixedThreadPool(canalOuterAdapters.size());
|
||||
this.topic = topic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#canalServerHost: 127.0.0.1:11111
|
||||
#zookeeperHosts: slave1:2181
|
||||
bootstrapServers: slave1:6667,slave2:6667 #or rocketmq nameservers
|
||||
bootstrapServers: slave1:6667,slave2:6667 #or rocketmq nameservers:host1:9876;host2:9876
|
||||
flatMessage: true
|
||||
|
||||
#canalInstances:
|
||||
@@ -14,9 +14,9 @@ flatMessage: true
|
||||
|
||||
mqTopics:
|
||||
- mqMode: rocketmq
|
||||
- topic: example
|
||||
topic: example
|
||||
groups:
|
||||
- groupId: example_g1
|
||||
- groupId: example
|
||||
outAdapters:
|
||||
- name: logger
|
||||
# - name: hbase
|
||||
|
||||
Reference in New Issue
Block a user