stuzanne/kafka-consumer

By stuzanne

Updated over 1 year ago

Kafka consumer app written in Python. Prints messages with their partition and offset.

Image
Message queues
0

158

stuzanne/kafka-consumer repository overview

Generic Kafka consumer app written in Python that prints out message with their partition and offset. Works with the Confluent schema registry to deserialize Avro and JSON messages when provided such config.

The app's source code is on GitHub.

The configuration can be changed by setting environment variables.

NameDefaultDescription
KAFKA_BOOTSTRAP_SERVERSlocalhost:19092Kafka broker connection string
SCHEMA_REGISTRY_URLhttp://localhost:8084URL for the Schema Registry service
SERIALIZATIONNoneType of serialization to use for message handling
SCHEMA_LOCNoneLocation of the schema
SCHEMA_FILE_PATHNoneFile path to the schema definition
TOPICScustomersComma-separated list of Kafka topics to consume (whitespace will be trimmed)
SLEEP_TIME1Time to sleep between processing each message (in seconds)
CLIENT_IDmy-python-consumerIdentifier for the Kafka consumer client
CONSUMER_GROUP_IDmy-mostly-pythonic-consumer-groupConsumer group identifier for managing partition assignments
AUTO_OFFSET_RESETearliestControls where to start reading messages when no offset is stored

Limitations

Security has not been built into this PoC app, must be an Kafka cluster that does not require authentication.

Tag summary

Content type

Image

Digest

sha256:8620013b7

Size

65.6 MB

Last updated

over 1 year ago

docker pull stuzanne/kafka-consumer