dpkp / kafka-python

Python client for Apache Kafka
http://kafka-python.readthedocs.io/
Apache License 2.0
5.59k stars 1.4k forks source link

kafka producer run in multi processing #1732

Open hongym7 opened 5 years ago

hongym7 commented 5 years ago

Hi, I have a question. I wanna run kafka-producer by multi process. But, below source is not working.

ex)

from multiprocessing import Process

def produce result():
    producer = KafkaProducer(bootstrap_servers='127.0.0.1:9092)
    producer.send('aaa', value='bbb')

p = Process(target=produce_result)
p.start()

I don't know why? Help me.

jeffwidman commented 4 years ago

What is the error you are seeing? Can you provide DEBUG level logs?