-
Notifications
You must be signed in to change notification settings - Fork 1.4k
WIP: KafkaProducer #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: KafkaProducer #333
Conversation
…: Noop, String, Json, Msgpack
The interface of this producer class is modeled after the new upstream java client in version 0.8.2: http://kafka.apache.org/documentation.html#producerapi KafkaProducer is configured via keyword arguments to the __init__() constructor. The configuration keywords generally follow the upstream java client settings. Messages are produced with KafkaProducer.send(), which places the messages on an internal FIFO queue. Messages are consumed from the queue asynchronously by a background worker thread.
…ining each exception we handle
@dpkp is there anything I can do to get help with this PR? |
I put it aside for a while in favor of improving the existing producer implementations. If you think it is useful in current form, I will take a look and maybe merge after 0.9.4 release. Have you tried it out? |
No :-) Just trying to get the current state of async-producers (or batching message sending) and stumbled above this PR. |
b5e3a14
to
4955582
Compare
closing in favor of #515 |
This PR implements a new asynchronous producer with an interface similar to the new java upstream client.
It currently uses a single background thread and does not support batching.
TODO: support batching; use event loop or multiple threads; use futures instead of callbacks
(this PR is based on #332, will rebase to master if/when that lands separately)