mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
@@ -75,6 +75,7 @@ public class CanalConstants {
|
||||
public static final String CANAL_MQ_VHOST = ROOT + "." + "mq.vhost";
|
||||
public static final String CANAL_MQ_ALIYUN_UID = ROOT + "." + "mq.aliyunuid";
|
||||
public static final String CANAL_MQ_EXCHANGE = ROOT + "." + "mq.exchange";
|
||||
public static final String CANAL_MQ_DATABASE_HASH = ROOT + "." + "mq.database.hash";
|
||||
|
||||
public static String getInstanceModeKey(String destination) {
|
||||
return MessageFormat.format(INSTANCE_MODE_TEMPLATE, destination);
|
||||
|
||||
@@ -298,6 +298,11 @@ public class CanalStarter {
|
||||
mqProperties.setExchange(exchange);
|
||||
}
|
||||
|
||||
String databaseHash = CanalController.getProperty(properties, CanalConstants.CANAL_MQ_DATABASE_HASH);
|
||||
if (!StringUtils.isEmpty(databaseHash)){
|
||||
mqProperties.setDatabaseHash(Boolean.valueOf(databaseHash));
|
||||
}
|
||||
|
||||
for (Object key : properties.keySet()) {
|
||||
key = StringUtils.trim(key.toString());
|
||||
if (((String) key).startsWith(CanalConstants.CANAL_MQ_PROPERTIES)) {
|
||||
|
||||
@@ -137,6 +137,7 @@ canal.mq.username=
|
||||
canal.mq.password=
|
||||
canal.mq.aliyunuid=
|
||||
|
||||
canal.mq.database.hash = true
|
||||
##################################################
|
||||
######### Kafka Kerberos Info #############
|
||||
##################################################
|
||||
|
||||
Reference in New Issue
Block a user