Open iamabear09 opened 8 months ago
docker compose
를 통해 kafka server를 기동
새로운 container에서 kafka console producer 동작 & topic 생성
docker run -it --rm --network kafka_docker_example_net confluentinc/cp-kafka /bin/kafka-console-producer --bootstrap-server kafka:9092 --topic test_topic
kafka server container 내부에서 topic 생성
kafka-topics --bootstrap-server localhost:9092 --create --topic welcome-topic
새로운 container에서 kafka console consumer 동작
docker run -it --rm --network <network name> confluentinc/cp-kafka /bin/kafka-console-consumer --bootstrap-server kafka:9092 --topic <topic name>
Kafka Listers
advertised.listeners
LISTENERS
1) When a client (producer/consumer) starts,
2) client will then
아래와 같이 설정해도 동작한다.