异常如下:
连接信息:
from kafka import KafkaProducer
producer = KafkaProducer(bootstrap_servers=['localhost:9092'])
解决办法:
只需将security_protocol="SSL" KafkaProducer security_protocol="SSL"添加到KafkaProducer即可解决此KafkaProducer ,如下所示:
from kafka import KafkaProducer
producer = KafkaProducer(security_protocol="SSL", bootstrap_servers=['localhost:9092'])
借鉴:
https://stackoom.com/question/3y2xB/kafka-python引发UnrecognizedBrokerVersion错误