Skip to main content

kafka-viewer

kafka-viewer is a lightweight local Streamlit UI for reading Kafka messages for inspection. Kafka connection details come from a local properties file. Consumer offsets are not committed or modified.

Installation

pip install kafka-viewer

Configuration

Create a local Java-style .properties file named kafka-viewer.properties. The --config option is mandatory:

kafka-viewer --config /path/to/kafka-viewer.properties

PowerShell:

kafka-viewer --config C:\path\to\kafka-viewer.properties

Kafka connection properties use the kafka. prefix. Schema Registry properties use the schema.registry. prefix. The topic and consumer group are selected in the UI; they are not required in the properties file. The application determines unsecured or secured Kafka from the configured Kafka properties.

Kafka security

Java-style Kafka property names are mapped to the corresponding kafka-python consumer configuration names. Supported security protocols are PLAINTEXT, SSL, SASL_PLAINTEXT, and SASL_SSL. The implemented SASL mechanisms are PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, GSSAPI, and OAUTHBEARER; username/password mapping is provided for PLAIN and SCRAM, while GSSAPI uses the configured username as the Kerberos name.

Unsecured Kafka:

kafka.bootstrap.servers=localhost:9092

SASL/SSL with placeholder credentials:

kafka.bootstrap.servers=localhost:9093
kafka.security.protocol=SASL_SSL
kafka.sasl.mechanism=PLAIN
kafka.sasl.username=YOUR_USERNAME
kafka.sasl.password=YOUR_PASSWORD

Only supported kafka.* properties are passed to kafka-python. Unsupported Kafka properties are reported rather than silently passed through. kafka.bootstrap.servers is required.

Schema Registry / Confluent Avro

Schema Registry support is optional. Without schema.registry.url, the existing Kafka value handling is used. When it is configured, kafka-viewer attempts Confluent Avro deserialization. The deserializer reads the Schema ID from the Confluent Avro payload and retrieves the corresponding schema; users do not configure a schema ID, version, or subject. The topic continues to be selected through the existing UI.

Unauthenticated Schema Registry:

schema.registry.url=https://schema-registry.example.com

Optional Schema Registry Basic Authentication:

schema.registry.url=https://schema-registry.example.com
schema.registry.basic.auth.user.info=YOUR_USERNAME:YOUR_PASSWORD

Schema Registry authentication is used only when the authentication property is provided. Schema Registry properties are handled separately and are never passed to KafkaConsumer.

If Avro deserialization fails, the Kafka message is not discarded. The UI continues to show its metadata, a failure indication, a safe bounded raw-payload representation, and a safe error message. This distinguishes messages that did not arrive from messages that arrived but could not be decoded.

The UI lets you check Kafka connection status, discover and select topics, enter or generate a temporary consumer group ID, and load:

  • The latest N messages.
  • Messages from the beginning.
  • Messages from a date/time.
  • Messages within a date/time range.

Multiple Kafka partitions are supported. All reads have a bounded message count. Loaded messages show the partition, offset, timestamp, key, and message value. Messages can be expanded to view the complete message value, including formatted JSON when applicable.

Offset behavior

kafka-viewer is intended for inspection. It does not commit consumer offsets or modify existing consumer-group progress.

Safe configuration

Keep real .properties files containing credentials out of source control. Use kafka-viewer.properties.example as a template only, and never paste credentials into documentation.

Limitations

The implementation supports the Kafka security protocols and SASL mechanisms listed above, plus optional Confluent Avro deserialization. It does not support:

  • Protobuf.
  • Publishing messages.
  • Topic or consumer-group administration.
  • Multiple Kafka clusters.

Development

python -m pytest
python -m build

Release files for kafka-viewer 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kafka-viewer 0.2.0
File Size Uploaded
kafka_viewer-0.2.0.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kafka-viewer 0.2.0
File Interpreter ABI Platform
kafka_viewer-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.7 kB

Release files / kafka_viewer-0.2.0.tar.gz

Download URL kafka_viewer-0.2.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
607734ce678168fcec5f0275c2895b2a05c41a1082bd57c828e96f1c44dfa818
BLAKE2b-256 checksum
How to use checksums
63eb0e6976b7640137615b575f49c67f23486bb71cfc6d61798436a52fb3f018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / kafka_viewer-0.2.0-py3-none-any.whl

Download URL kafka_viewer-0.2.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a41aa6ea276ecf8d44ffaff7e8688e3126961f0e43e43eb398a2ed4590a58f9
BLAKE2b-256 checksum
How to use checksums
ea3c668096d816f920c66e27d5a3f7e9ff4dfab58dfc0beda932af9b64567e07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page