简体   繁体   中英

Is there a way to implement a Kafka producer without importing Producer from confluent_kafka?

I need to implement a Kafka producer in Python but I want to avoid possible future issues about new Kafka versions, so I would like to know if it is possible to implement a Kafka producer without importing the Producer module from confluent_kafka?

Import the producer from kafka-python or aiokafka then...?

Sure, you can re-implement the TCP protocol yourself, but you'll get fixes faster if you use a well maintained library, and you'll have the exact same problem with anything else, if there ever is a breaking change

However, the Kafka protocol has maintained backwards compatibility ever since version 0.10 (released 4 years before the current version, as of this post!)

I'd say you're over thinking the problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM