Python系列之:使用kafkaProducer生产数据,KafkaConsumer消费数据
一、构建KafkaProducer
producer = KafkaProducer(
bootstrap_servers=kafkaBrokers,
security_protocol='SASL_PLAINTEXT',
sasl_mechanism='PLAIN',
sasl_plain_username="optics",
sasl_plain_password="optics123",
value_se