-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add more options to messages
method for simple consumer
#69
Comments
Hi, I'm happy to merge in a pull request for it :) I guess that the reason I'd not added it already, or had people submit patches, is that the ZooKeeper consumer seems to be the preferred API, I added the simple consumer in the early days just because it was easier to test out using Kafka. |
I'll do a PR. I am using the simple consumer because I want to manage offsets myself. Unfortunately, the simple consumer is quite too basic and the ZK consumer is not flexible at all (you need to let it handle everything). Hopefully, Kafka 0.9 comes with a new consumer API that will unify everything. The API is already available in 0.8 but not fully implemented (rebalancing and stuff like that, I am not quite sure, but they rely on stuff that will only be available in 0.9). |
We've used the ZK consumer and managed offsets ourselves (if it helps?). We just track the Still- a PR would be appreciated, thank you! |
Humm, good idea. I wish I would have thought about that earlier. :) But as Kafka 0.9 is almost here, I'll just use the new consumer API not relying on ZK. The PR is on its way. |
Currently, it is not possible to set
maxWait
andminBytes
for the request to be built. Therefore, it defaults to 0 for both values.It means that if there is no message available,
messages
will just return without blocking and therefore, if we try to wait for new messages, we enter a tight loop except if we sleep between each requests (but in this case, latency is increased).Being able to specify those values would be useful.
The text was updated successfully, but these errors were encountered: