Skip to content
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

Searching messages is currently ridiculously slow #1834

Closed
jonasvoelcker opened this issue Jun 18, 2024 · 4 comments · Fixed by #1843
Closed

Searching messages is currently ridiculously slow #1834

jonasvoelcker opened this issue Jun 18, 2024 · 4 comments · Fixed by #1843

Comments

@jonasvoelcker
Copy link
Contributor

When searching in a topic containing much data, the search will never finish due to a combination of a poll-timeout of 1 second combined with max.poll.records of 50.

@jonasvoelcker
Copy link
Contributor Author

If the max.poll.records are increased there is also a problem with the oldest listing as it returns a list, which is way too large:

image

image

#1840

@AlexisSouquiere
Copy link
Collaborator

I tried your 2 fixes (config update + limit on oldest consume) but for me there is still the default 50 records limit applied consumer max.poll.records because of this line:

properties.put(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, options.getSize());

size will always be 50 if you keep the default value. But increasing it will increase the number of records that will be displayed

this.size = environment.getProperty("akhq.topic-data.size", Integer.class, 50);

Don't you have the same behaviour ?

@AlexisSouquiere
Copy link
Collaborator

I tried to remove the property from the consumer in the search function but the 50 records limit to be displayed in the UI is not applied anymore I was showing hundreds of matching records. We probably have to apply it later, probably here

// More records than expected, send the records and then stop
else if (matchesCount.get() >= options.getSize()) {
currentEvent.emptyPoll = 666;
emitter.onNext(currentEvent.progress(options));

@jonasvoelcker
Copy link
Contributor Author

jonasvoelcker commented Jun 19, 2024

Hi @AlexisSouquiere,

thanks a lot for the detailed checks 🙂

I've worked on that and came to this solution: #1843

Feel free to doublecheck it as well 😉

Best Regards
Jonas

@github-project-automation github-project-automation bot moved this from Backlog to Done in Backlog Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants