Skip to content

jriester/PythonKafkaClients

Repository files navigation

PythonKafkaClients

Initial Setup

  1. Fill out client.ini, adding your cluster and client details and setting any necessary configurations
  2. If using CP-Demo, make sure Kafka1, Kafka2, and SchemaRegistry are up using docker ps

Calling the clients from the terminal

All clients are called with the same syntax:

python3 <filename> client.ini
e.g python3 Producer.py client.ini

Module not found

If you run into this error, use pip3 to install the missing module

pip3 install confluent_kafka

Producing tips

  1. If using a key, make sure you fill out the appropriate code regarding your keys
    1. Make sure key_serializer is correct in the function init_producer_serializer
    2. Uncomment the key sections of producer.produce(...) in the fuction produce_specific_message
  2. If you're not using a key for any messages, no changes need to be made

Footnotes

  1. Confluent's confluent-kafka-python examples1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages