Previosly I have error like this SyntaxError on "self.async" when running python kafka producer
Based on the answer, best answer is switch from kafka package to kafka-python package, this is what the detail of my docker-compose configuration, I think to change the docker image because of the docker log still similar
kafka:
image: wurstmeister/kafka
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ADVERTISED_PORT: 9092
KAFKA_CREATE_TOPICS: "segmentation"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- "2181:2181"
Do I need to change the docker compose? If yes what to change?