Skip to content

Parameter to only show the latest sate in topics with log compaction #179

Open
@1nval1d

Description

@1nval1d

Hi,

I started using a lot of log compaction and am missing a feature from kafkactl.
It would be quite useful if the tool only showed the latest message for a key and excluded removed keys entirely.
So if I had a compacted topic with messages for 3 keys, one just one message with offset 1, one a start (offset 2) and an update (offset 3) and the last one a start (offset 4) and a tombstone (offset 5), Id like to only get messages 1 and 3.

It would be awesome if that even worked with the tail command so the tool delivered the amount of messaged specified in the parameter after the filtering for valid keys, but to my knowledge that's not really possible or is it? You'd need to consume a topic backwards with decreasing offsets for that.

As this is not expected behaviour, its probably a bad idea to make it the default for topics with compaction but a parameter to enable it would be great.

I have no clue of Go, otherwise Id create a PR for it but Id really appreciate it, if that was added.
If I can be of useful help, let me know.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions