我需要连接到kafka实例,它有多个代理与SSL。我正在使用kafka-python来消费和处理数据。
我见过他们使用kafka-python通过SSL连接到单个代理的链接。
特定代码
consumer = KafkaConsumer(bootstrap_servers='my.server.com',
security_protocol='SSL',
ssl_check_hostname=True,
ssl_cafile='CARoot.pem',
ssl_certfile='certificate.pem',
ssl_keyfile='key.pem')
我需要知道,因为有多个代理,如何在构造函数中指定多个ssl_ca,ssl_cert,ssl_key ??
发布于 2018-07-19 04:58:19
SSL应该设置为客户端可以向您的任何代理进行身份验证。我建议您阅读本教程,以便对SSL基础https://docs.confluent.io/current/kafka/encryption.html#kafka-ssl-encryption有更好的了解。
https://stackoverflow.com/questions/51398235
复制相似问题