-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
As a consumer, how can I get partition count for a topic #94
Comments
At what time do you want the partition count?
|
In this particular case, before calling consume start On Friday, March 21, 2014, Magnus Edenhill [email protected] wrote:
|
Ok, your program would have to wait for this information to be available (rdkafka needs to connect to brokers, query metadata, etc). I see two alternatives here:
The async approach is preferred and the application can provide its own sync version on top of it if necessary. Comment? |
This is related to issue #90 |
that's fine. In this particular use case, I just want it at program On Fri, Mar 21, 2014 at 10:19 PM, Magnus Edenhill
|
Okay, so then your program would look something like:
Right? |
looks reasonable On Fri, Mar 21, 2014 at 10:30 PM, Magnus Edenhill
|
The topic metadata is a bit complex, it will be formatted something like this:
|
Have a look in This also adds a handy -L switch rdkafka_example:
|
Please verify this on your end aswell. |
Let's say I have a known algorithm for choosing the partition in my publisher. However, that algorithm takes the partition count into consideration via the partitioner_callback. How can I get the partition count in a consumer so I can apply a similar algorithm?
The text was updated successfully, but these errors were encountered: