-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Subscribe to topic partition list #233
Comments
To not create a separate
|
@mensfeld WDYT? |
You can subscribe to the topic and use the I know that librdkafka does not have pluggable assignment strategies (ref: confluentinc/librdkafka#2284) and this could potentially partially mitigate this. I'm hesitant to recommend a separate method for TPL-based assignments like Aside from that: I would opt to make it fail-safe. That is, making sure that only valid TPLs can be used and if not, adding some sort of notifications around that. Doing it that way requires getting the topics metadata from the cluster in a non-cached way preferably. Overall I do see it as an advanced use-case that this library should support. Is it a high-priority one? Def. not to me. |
But this is what rdkafka actually allows you to set in it's example. The main usecase for me is to set offset to the beginning of the partition explicitly upon subscribe. I don't necessarily see it as being advanced :) |
I was referring to building a custom assignment flow per partition to load-balance processes subscriptions. The usecase of setting it explicitly upon the first usage differently per topic def. should be supported. It is still not the top priority for me but if we all agree on the API (cc @thijsc ) I don't see any reason not to work on it together :) |
I'm totally fine writing it myself, just want to agree on API beforehand. |
I agree about usability, I don't like the complexity of handling two sets/types of incoming arguments in the same method. |
@fxposter you want to revisit this with me? :) happy to make it move forward |
Currently when you want to subscribe to a topic - you are forced to subscribe to "default" offset and partitions, as in Consumer#subscribe you only can specify topic names. The underlying rd_kafka_subscribe accepts TopicPartitionList that allows choosing partitions/offsets if needed. I'd like to have a way to either subscribe to a TPL directly or have a way to pass more data to Consumer#subscribe, so that things like "explicitly consume from particular offset" could be easily done.
WDYT? What API would you like to have in the library for this?
The text was updated successfully, but these errors were encountered: