r/apachekafka • • 23d ago

Tool I built an open-source tool for exploring Kafka compacted topics

Hi there! I've been working on an open-source project called KGazer, designed to make working with Kafka compacted topics a bit easier.

The idea came from a problem I've run into myself: sometimes you just want to find the current value of a particular key, see how it's changed over time or investigate its previous versions. Doing this often means writing a temporary Kafka consumer or putting together a few scripts.

I wanted to make that process simpler.

- KGazer provides a web interface where you can:

- Browse keys and search message values.

- Inspect the history of individual keys.

- Compare different message versions using JSON diffs.

- Visualise how values change over time.

- Monitor consumer groups and consumer lag.

It also supports multiple Kafka clusters, Avro and Protobuf deserialisation, and Kubernetes deployments.

Under the hood, it's built with Go and React, uses PostgreSQL for storage, and is released under the MIT licence.

GitHub: https://github.com/alfonsojimenez/kgazer

It's still an evolving project, so I'd genuinely appreciate feedback from anyone working with Kafka, particularly those running it in production.

I'm curious: how do you currently inspect compacted topics and investigate changes to individual keys? Is this something you find yourself writing scripts for or do you use another tool?

I'd be interested to hear what you'd find useful in a tool like this.

3 Upvotes

4 comments sorted by

2

u/DoppelFrog 22d ago

How do you see anything other than the latest message in a compacted topic?

1

u/alfonsojimenez 21d ago

Hey @DoppelFrog. It depends on the topic's cleanup policy and whether compaction has already taken place.

With "cleanup.policy=compact", Kafka doesn't immediately remove older records when a new value arrives for the same key. Until the log cleaner processes them, previous versions may still be available.

However, once compaction removes older records, you can no longer retrieve them directly from Kafka.

This is where KGazer comes in. KGazer stores the full message history independently, so you can still browse and compare previous versions of a key, even after Kafka has removed those messages through compaction.

That's one of the main reasons I built it: to make it easier to understand how data has evolved over time without losing that history when Kafka compacts the topic.

2

u/DoppelFrog 21d ago

Isn't this just a regular Kafka topic with extra steps?