Modify canal-client config and polish consumer implementation

This commit is contained in:
duhengforever
2018-09-30 09:40:05 +08:00
parent af03f07cc7
commit fa8588f766
3 changed files with 10 additions and 8 deletions

View File

@@ -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;

View File

@@ -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