Open guntherrhon opened 5 years ago
hostname
should not be set to the same name for each containernetwork_mode: host
on each serviceKAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://MY_IP_HOST:29092
And test your transactional application.
note: KAFKA_CREATE_TOPICS
does not work for these containers.
Hi, im using kafka instance from docker-compose (in attach my docker-compose.yml). Using no transactional mode i can connect, publish and correctly consume messages. If i use transactional way during initTransaction method i got TimeoutException:
================ MY YML FILE ================ version: '2.0' services:
kafka-topics-ui: ports:
PROXY=true image: landoop/kafka-topics-ui
zookeeper: image: confluentinc/cp-zookeeper:5.1.2 hostname: MY_IP_HOST ports:
broker: image: confluentinc/cp-enterprise-kafka:5.1.2 hostname: MY_IP_HOST ports:
control-center: image: confluentinc/cp-enterprise-control-center:5.1.2 hostname: MY_IP_HOST ports:
ksql-server: image: confluentinc/cp-ksql-server:5.1.2 hostname: MY_IP_HOST ports:
ksql-cli: image: confluentinc/cp-ksql-cli:5.1.2 entrypoint: /bin/sh tty: true
rest-proxy: image: confluentinc/cp-kafka-rest:5.1.2 ports:
8082:8082 hostname: MY_IP_HOST environment: KAFKA_REST_HOST_NAME: MY_IP_HOST KAFKA_REST_BOOTSTRAP_SERVERS: 'MY_IP_HOST:9092' KAFKA_REST_LISTENERS: "http://0.0.0.0:8082" KAFKA_REST_SCHEMA_REGISTRY_URL: 'http://MY_IP_HOST:8081'
Where MY_IP_HOST is my linux ip vm. Thanks in advance Christian