我已根据以下链接为broker(名为kafka1)和producer配置了ssl:https://www.vertica.com/docs/9.2.x/html/content/authoring/kafkaintegrationguide/tls-ssl/kafkatls-sslexamplepart3configurekafka.htm).
与代理不同,producer.properties文件中没有成功配置producer。因为有如下配置的kerberos身份验证服务,我无法设置 security.protocol = SSL
如上链接所述:
security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
sasl.kerberos.service.name=kafka
为了向Kafka生成数据,使用以下命令:
kafka-console-producer.sh --broker-list kafka1.sgi.ir:9093 --topic test1kafka1 --producer.config /home/pskafka/kafka_2.12-2.4.0/config/producer.properties
最后,我的问题是如何在 producer.properties
配置文件?
形象 producer.properties
配置文件如下:
compression.type=none
security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
sasl.kerberos.service.name=kafka
# security.protocol=SSL
ssl.truststore.location=/var/private/ssl/kafka.truststore.jks
ssl.truststore.password=test123
ssl.keystore.location=/var/private/ssl/client1.keystore.jks
ssl.keystore.password=test123
ssl.key.password=test123
ssl.enabled.protocols=TLSv1.2,TLSv1.1,TLSv1
# ssl.client.auth=required
暂无答案!
目前还没有任何答案,快来回答吧!