I am trying to produce AVRO data to Kafka topic through python producer script, I already installed python dependencies avro-python3 and confluent_kafka, however when running this script i got below error:
File "./kafka_producer_avro.py", line 24, in <module>
kafka_producer_obj = Producer(kafka_config_obj)
cimpl.KafkaException: KafkaError{code=_INVALID_ARG,val=-186,str="No such configuration property: "bootstrap_servers""}
After investigation i found that I should install (libsasl2-dev and libsasl2-modules) dependencies.
(sudo yum install gcc libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
), but i got below
Error: Unable to find a match: python-devel python-pip python-wheel libsasl2-devel
Your shown error has nothing to do with OS packages.
It's bootstrap.servers
, not with an underscore. Also, the Kafka module is with hyphen, not underscore.
Docs - https://docs.confluent.io/kafka-clients/python/current/overview.html
You can additionally install fastavro
with pip.