diff options
author | Dana Powers <dana.powers@rd.io> | 2014-08-26 17:13:47 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2014-08-26 19:24:33 -0700 |
commit | a94005486ff7329aacbe8f89524de4b237ab0103 (patch) | |
tree | 945c04ad90d0a6dd8e2630f7b3c8105d930d898f /kafka | |
parent | 26042ae7f53fbcfd4ccdd6c4d5b11c54ba04f312 (diff) | |
download | kafka-python-a94005486ff7329aacbe8f89524de4b237ab0103.tar.gz |
Add warnings to README, docstring, and logging that async producer does not retry failed messages
Diffstat (limited to 'kafka')
-rw-r--r-- | kafka/producer.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kafka/producer.py b/kafka/producer.py index 800e677..8a6bff0 100644 --- a/kafka/producer.py +++ b/kafka/producer.py @@ -87,6 +87,9 @@ class Producer(object): client - The Kafka client instance to use async - If set to true, the messages are sent asynchronously via another thread (process). We will not wait for a response to these + WARNING!!! current implementation of async producer does not + guarantee message delivery. Use at your own risk! Or help us + improve with a PR! req_acks - A value indicating the acknowledgements that the server must receive before responding to the request ack_timeout - Value (in milliseconds) indicating a timeout for waiting @@ -131,6 +134,9 @@ class Producer(object): self.codec = codec if self.async: + log.warning("async producer does not guarantee message delivery!") + log.warning("Current implementation does not retry Failed messages") + log.warning("Use at your own risk! (or help improve with a PR!)") self.queue = Queue() # Messages are sent through this queue self.proc = Process(target=_send_upstream, args=(self.queue, |