You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 24, 2021. It is now read-only.
Behaviour: producing a message fails when a producer is created with sync=True and required_acks=0. This does not happen with required_acks=1 (default) or sync=False (default).
To reproduce:
from pykafka import KafkaClient
kafka_client = KafkaClient(hosts=HOSTS)
topic = kafka_client.topics[TOPIC]
message = 'test'
with topic.get_producer(sync=True, required_acks=0) as producer:
producer.produce(message)
Exception:
Traceback (most recent call last):
File "test.py", line 11, in <module>
producer.produce(message)
File "/home/ubuntu/carl/kafka-tests/venv/local/lib/python2.7/site-packages/pykafka/producer.py", line 169, in __exit__
self.stop()
File "/home/ubuntu/carl/kafka-tests/venv/local/lib/python2.7/site-packages/pykafka/producer.py", line 219, in stop
self._wait_all()
File "/home/ubuntu/carl/kafka-tests/venv/local/lib/python2.7/site-packages/pykafka/producer.py", line 359, in _wait_all
self._raise_worker_exceptions()
File "/home/ubuntu/carl/kafka-tests/venv/local/lib/python2.7/site-packages/pykafka/producer.py", line 154, in _raise_worker_exceptions
raise ex
AttributeError: 'NoneType' object has no attribute 'topics'