aiokafka
aiokafka copied to clipboard
Publish messages to None topic with AIOKafkaProducer
Hello,
If we try publish message into None topic there are some error messages:
Unable to request metadata from node with id 0: ConnectionError: Connection at localhost:9092 broken
Unable to update metadata from [0]
...
Code snippet to reproduce:
import aiokafka
p = aiokafka.AIOKafkaProducer(bootstrap_servers=["localhost:9092"],
loop=loop)
loop.run_until_complete(p.start())
loop.run_until_complete(p.send_and_wait(None, b"sobaka"))
loop.run_until_complete(p.stop())
Packages versions:
aiokafka==0.4.0
kafka-python==1.3.5
Related to https://github.com/aio-libs/aiokafka/issues/440
We should not allow topic to be none on serialization level. Maybe it should be fixed on kafka-python side so that ProduceRequest does not allow empty topic names.
+1