🎬 Video tour

A walkthrough of the most common tasks in under 90 seconds.

🏗️ Connect a cluster

1. Add the cluster

  1. Open Cluster → Edit Clusters (Ctrl+E).
  2. On the Direct Clusters tab click Add.
  3. Enter a name and the bootstrap servers, e.g. localhost:9092 or a comma-separated list such as broker-1:9092,broker-2:9092.
  4. Click OK, then Save.

The coloured dot next to each cluster shows its connection status: reachable, unreachable, not checked yet. Untick Enabled to hide a cluster without deleting it.

Edit Clusters dialog listing Production, Staging and Local Docker clusters with green status dots
Edit Clusters lists every cluster with its status.
Add Cluster dialog with cluster name and bootstrap servers fields
A cluster only needs a name and its bootstrap servers.

2. Open it

Choose Cluster → Open Cluster → your cluster. It opens in a new tab and its topics appear on the left. Open tabs are restored the next time you start KafkaLens (configurable in Preferences).

🧭 The main window

KafkaLens main window showing topics, a list of order messages and a pretty-printed JSON message
  • Topics (left) — every topic in the cluster; expand one to see its partitions. Type in Filter topics… to narrow the list. Cluster Info shows the address and topic count.
  • Message list (centre, top) — partition, offset, timestamp, key and a one-line value summary. Click a column header to sort; drag to resize or reorder columns.
  • Message viewer (centre, bottom) — the selected message, formatted, with its headers on a second tab.
  • Fetch panel (right) — where to start reading and how many messages to fetch.
  • Status bar (bottom) — the latest activity; click Log to open the full application log.

📥 Fetching messages

Select a topic to read from all of its partitions, or expand it and select a single partition. The latest messages are fetched right away; use the fetch panel to change what is read, then click Fetch Messages (or press F5). Click Stop to cancel a long fetch.

FromWhat it reads
EndThe most recent messages (default).
StartThe oldest messages still retained.
TimestampMessages from a date and time (HH:mm:ss). Turn on Fetch backwards to read the messages before that time instead.
OffsetPartitions only: messages from an exact offset, forwards or backwards.

Count limits how many messages are fetched (10 to 25,000 by default; the list and the default are configurable in Preferences).

Fetching 50 messages from partition 2 of shipments.tracking starting at a timestamp
Reading 50 messages from one partition, starting at a timestamp.

🔍 Inspecting messages

Click a message to open it in the viewer. JSON is pretty-printed and syntax-highlighted; use the Zoom slider to change the font size. The Headers tab lists every Kafka header as text.

Headers tab showing content-type, source-service, schema-version, traceparent and correlation-id
Message headers such as trace and correlation IDs.

🧪 Filtering & search

Filter the message list

Type in the filter box above the list (Ctrl+F) to show only messages whose value contains your terms. Matching is case-insensitive and works on everything already fetched, so it is instant. Combine terms with boolean operators:

SyntaxMeaningExample
a && bboth termserror && !debug
a || beither termCANCELLED || PAYMENT_FAILED
!amust not contain!healthcheck
( )groupinguser && (login || logout)
"…"exact phrase"order_id":"ORD-2026-707037"
a bwords without an operator are OR-edwarn error

Click ? next to the box for a quick reference.

Message list filtered with CANCELLED || PAYMENT_FAILED
Only cancelled or failed orders out of 500 status changes.
Filter syntax help popup
The built-in filter syntax reference.

Filter inside a message

The Filter box under the viewer trims the selected message down to what you are looking for:

  • With Use Object Filter on (default), KafkaLens keeps only the JSON fields whose name or value matches, together with their parent objects — ideal for large, nested payloads.
  • With it off, it keeps only the matching lines of the formatted message.
Object filter 'method' reducing a payment event to its method object
Filtering a payment event by method leaves just the payment-method object.

🧩 Formatters & binary data

KafkaLens decodes keys and values with formatters. When you first open a topic it guesses a suitable one; built-in formatters are Json, Text and the numeric types Int8 … UInt64 (big-endian). Plugins can add more, e.g. for Avro or Protobuf.

  • To change it for the whole topic, open the Configuration tab, pick a Key Formatter and Value Formatter (or click Guess), and click Save. Tick Apply to every cluster to use the same choice for this topic on all clusters.
  • To view one message differently, use the Format drop-down under the viewer.
  • Hide formatters you never need in Edit → Preferences → Message Format.
Topic Configuration tab with key and value formatter selectors
Per-topic key and value formatters.
Binary latency metrics decoded as Int64 numbers
Binary 8-byte values decoded with the Int64 formatter.
Plain-text log messages filtered with ERROR || WARN
Plain-text payloads work too — here an audit log filtered to ERROR || WARN.

💾 Copying & saving messages

Right-click the message list:

  • Copy → Key, Value, Offset, Timestamp or All of the selected message.
  • Save Selected / Save All → As RAW (.klm, can be reopened in KafkaLens) or As Formatted (.txt, readable anywhere).

Messages are saved under <saved messages folder>/<cluster>/<topic>/<partition>/<offset>. The folder is set in Preferences → Browser; a notification after saving lets you open it.

To browse saved RAW messages later — even without access to the cluster — use Cluster → Open Saved Messages (Ctrl+O) and select the cluster's folder. It opens as a tab named <folder>(saved) with the same filtering and formatting tools.

Message list context menu with Copy, Save Selected and Save All

🗂️ Working with several clusters

Each opened cluster gets its own tab with its own topic selection, filters and fetch settings. Switch with Ctrl+Tab / Ctrl+Shift+Tab and close with Ctrl+W or the ✕ on the tab. You can open the same cluster more than once, e.g. to compare two topics.

Three cluster tabs: Production, Staging and Local Docker, with the topic list filtered to 'order'
Production, Staging and a local cluster side by side; the topic list is filtered to “order”.

🔐 Private clusters (KafkaLens backend)

If your brokers are only reachable inside a private network (VPC), run the lightweight KafkaLens gRPC backend (GrpcApi in the repository) on a host inside that network. It exposes a read-only API, so the desktop app never needs direct access to Kafka.

  1. Deploy the backend inside the network and list your clusters in its cluster_info.json. By default it listens on port 8080.
  2. In KafkaLens open Edit Clusters → KafkaLens Clients, click Add, and enter a name and the backend address (e.g. kafkalens.internal:8080) with protocol grpc.
  3. The clusters configured on the backend now appear under Cluster → Open Cluster alongside your direct clusters.

⚙️ Preferences, themes & plugins

Open Edit → Preferences:

  • General — theme (Light, Dark, or follow the system).
  • Kafka — consumer timeouts, fetch size limits and consumer group settings.
  • Browser — font size, available and default fetch counts, saved-messages folder, restoring tabs on startup, and how often cluster connectivity is checked.
  • Message Format — which formatters are offered for keys and values.
  • Privacy — turn anonymous usage statistics on or off and see exactly what was sent (details).
Preferences window, Browser tab
Browser preferences.
KafkaLens in the dark theme
The dark theme (View → Theme).

Edit → Plugin Manager installs plugins — extra formatters and themes — from plugin repositories. Want to write one? See the plugin development guide.

View → Application Log (or the Log button in the status bar) shows what KafkaLens is doing — useful when a connection fails. It can be searched, filtered and copied.

Application log panel at the bottom of the window

KafkaLens checks for updates automatically; turn this off or check manually from the Help menu.

⌨️ Keyboard shortcuts

Ctrl+EEdit clusters
Ctrl+OOpen saved messages
Ctrl+WClose the current tab
Ctrl+Tab / Ctrl+Shift+TabNext / previous tab
Ctrl+FFocus the message filter
F5Fetch again with the current settings

❓ Need help?

Found a bug or have a feature request? Please open an issue on GitHub. Attaching the application log (Log → Open Log File) helps a lot.