Dont allow producer to send messages with value=None to 0.8.0 brokers
python-kafka allows the insertion of a null value into a Kafka topic. Once this happens, the topic is rather permanently dead and no one can read from it. Details, including reproduction steps, are here: https://gist.github.com/wizzat/8970493
Actually the issue is related with Kafka bug, not with kafka-python implementation. It really exists at 0.8 but was fixed for 0.8.1 (ConsoleConsumer failed when a null is passed for the value). I've tested it with 0.8.2 and it works fine:
./kafka-console-consumer.sh --topic test --zookeeper zk --from-beginning --property print.key=true
null null
null abc
Should we handle such limitation in kafka-python code?
the new KafkaProducer class will raise an AssertionError if value=None and api_version is < 0.8.1
:+1: