kafdrop icon indicating copy to clipboard operation
kafdrop copied to clipboard

Add Message Search Functionality

Open nathanscottdaniels opened this issue 3 years ago • 2 comments

Overhaul search functionality prototype first introduced by @plmarcelo in PR #175. Improved performance by not reading the entire topic into memory and having a safety limit on the number of messages to read before the search aborts. Added a maximum results count. Added a date filter to allow user to specify which timestamp to start searching from. Added better output.

image image

nathanscottdaniels avatar Jun 18 '21 12:06 nathanscottdaniels

@nathanscottdaniels Can you please merge this feature, It really helps to quickly search.

sreenivasvp avatar Jun 27 '21 07:06 sreenivasvp

@nathanscottdaniels Can you please merge this feature, It really helps to quickly search.

That's not how pull requests work. Only obsidian dynamics can merge it, at their discretion. If you want to use this feature, you can clone my fork and build it locally.

nathanscottdaniels avatar Jun 27 '21 13:06 nathanscottdaniels

Hi Obsidian Dynamics - any thoughts on merging this PR? I'm looking for a Kafka tool that can do message searching within topics, and kafdrop with this PR looks ideal!

markabrahams avatar Mar 22 '23 22:03 markabrahams

How search is implemented? Given that Kafka doesn't have any native feature to search (as far as I know), my concern is that this feature can be abused and cause some trouble in the Kafka servers. What do you think?

Anyway for sure conflicts must be resolved before we can start evaluating it.

davideicardi avatar Mar 27 '23 08:03 davideicardi

How search is implemented? Given that Kafka doesn't have any native feature to search (as far as I know), my concern is that this feature can be abused and cause some trouble in the Kafka servers. What do you think?

Anyway for sure conflicts must be resolved before we can start evaluating it.

The code in this PR as well as its description answer all of your questions and concerns. But to summarize, searching is done within kafdrop by seeking to a point in time in the kafka topic and reading messages, filtering out those that don't match the search. I have put various safety measures in place to ensure the kafaka brokers are not abused, and this functionality is no more or less intensive the the brokers than a user of kafdrop flipping through pages of message previews.

nathanscottdaniels avatar Apr 14 '23 18:04 nathanscottdaniels

I do not have a working Java development environment anymore so another volunteer will need to resolve the merge conflicts, sorry.

nathanscottdaniels avatar Apr 14 '23 18:04 nathanscottdaniels

I will take care of that

Bert-R avatar Apr 17 '23 08:04 Bert-R

@nathanscottdaniels Can you allow me to push to the search branch in your fork?

Bert-R avatar Apr 18 '23 16:04 Bert-R

@Bert-R I think you can just fork his branch and add more commits, then create another PR. This should maintain history and credits...

davideicardi avatar Apr 18 '23 16:04 davideicardi

@nathanscottdaniels Can you allow me to push to the search branch in your fork?

Just sent you an invite

nathanscottdaniels avatar Apr 18 '23 16:04 nathanscottdaniels

@davideicardi It's compiling again and I've refactored it a bit for maintainability. One update is needed, based on a question I asked to Nathan. After that, I feel it's OK to merge this. The search behavior is just based on regular seeking and polling. I don't think it'll cause issues with the broker.

Bert-R avatar Apr 19 '23 13:04 Bert-R