【发布时间】:2019-12-05 02:09:05
【问题描述】:
我正在使用 confluent-kafka。我必须使用 ssl 从 kafka-broker 检索消息。现在,我已经使用这些属性(部分)配置了代理:
listeners=SSL://:9092
security.inter.broker.protocol = SSL
控制台消费者/生产者似乎可以正常使用此 ssl 配置。 对于控制台消费者/生产者,我有以下配置:
security.protocol=SSL
ssl.truststore.location=/home/ubuntu/kafka1.server.truststore.jks
ssl.truststore.password=<intentionally>
ssl.keystore.location=/home/ubuntu/kafka1.server.keystore.jks
ssl.keystore.password=<intentionally>
ssl.key.password=<intentionally>
现在,从控制台的角度来看,一切正常。
我在弄清楚如何使用 python-client 消费者(启用了 ssl)连接到代理时遇到问题。 文档讨论了要设置的这 3 个属性:
ssl.ca.location
ssl.certificate.location
ssl.key.location
但是,没有提及从哪里或如何为这些人获取数据。
请帮帮我。谢谢。
【问题讨论】: