-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
fetchOffsets should allow fetching offsets for all topics consumed by a consumerGroup #989
Comments
Heh, is Tulio promoting KafkaJS at Spotify now? :D Did you give it a try to make a request without explicitly listing topics? I can't see any reference to it in the Kafka protocol documentation, but reading the Java client it does look like if you don't provide any topic partitions in the OffsetsFetch request, it returns offsets for all known topics that the consumer group has committed offsets for. I think it was a mistake to have the method accept a single topic, rather than an array of topics. We could do a polymorphic thing where we accept both types to avoid having to make a breaking change, but I'm pretty sure our implementation currently makes a lot of assumptions that we will have to revisit. Would you be willing and able to start working on a PR for this? |
Actually we use it internally at Fiverr and I like the simplicity of it so thought to adopt it for the plugin as well.
I haven't, but I think you're right - Kafka Java API provides an ability to do that:
Definitely! |
Is your feature request related to a problem? Please describe.
I'm writing a Kafka plugin to Backstage and want to use kafkajs. One of the features I'm developing is the ability to view all topics (+offsets) consumed by a consumer group so I need a way to fetch that from the Kafka cluster.
Describe the solution you'd like
Currently the only API I see that I can use for that is
admin.fetchOffsets
. However, it requires me to set the topic I want to fetch offset from even though the internal method doesn't seem to require it. I think we can remove the assertion thattopic
is not null on calls toadmin.fetchOffsets
withresolveOffsets===false
.Additional context
Backstage Issue #3791
The text was updated successfully, but these errors were encountered: