only fetch topic data that are part of the consumer groupId (10 times faster) #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the process is fetching all topics with its offset and consumergroup data. Then it filters the topics on if it has any offsets available for the consumer group.
By any means we are discarding 99% of the data that we are fetching from Kaka. In my case the numer of topics consists of roughly 1200 and its showing maybe 9 topics with its data. Which means we are fetching data for 1191 topics that we don't need.
So instead of fetching all topic and offset data and then filtering down on the consumer groupId we now first fetch all offsets for the Consumer GroupId and construct a list of topics for which we need to fetch data.
This means we are now only fetching a fraction of the data and therefore are faster in loading the page.
Previous implementation

Improved implementation
