打开kafka的sasl安全认证机制
在canal的配置conf/canal.properties添加配置
canal.mq.properties.security.protocol = SASL_PLAINTEXT
canal.mq.properties.sasl.mechanism = PLAIN
canal.mq.sasl.jaas.config = org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="密码";
kafka.sasl.jaas.config = org.apache.kafka.common.security.plain.PlainLoginModule required username='admin' password='密码';
kafka.sasl.mechanism = PLAIN
kafka.security.protocol = SASL_PLAINTEXT
重启canal
仅供参考