- 3 nodes
- UI using
kafka UI
http://localhost:8080/ - UI using
kouncil
http://localhost:8082/
docker-compose up -d
Before connecting to cluster from outside docker ( ex from your docker host - your PC ), we also need to config host file:
Example for windows:
# C:\Windows\System32\drivers\etc\hosts
127.0.0.1 kafka01
127.0.0.1 kafka02
127.0.0.1 kafka03
kafka01:29192,kafka02:29292,kafka03:29392
Or run demo directly inside docker using bellow commands:
docker run -it --rm --network kafka-kraft-cluster-docker-compose_default confluentinc/cp-kafka /bin/kafka-console-producer --bootstrap-server kafka01:9092,kafka02:9092,kafka03:9092 --topic test_topic
then enter some text to produce message
inside docker (container => container)
docker run -it --rm --network kafka-kraft-cluster-docker-compose_default confluentinc/cp-kafka /bin/kafka-producer-perf-test --topic test_topic --num-records 1000000 --throughput -1 --producer-props bootstrap.servers=kafka01:9092,kafka02:9092,kafka03:9092 batch.size=16384 acks=1 linger.ms=50 --record-size 1000
outside docker (from host => container)
$ .\kafka-producer-perf-test.bat --topic test_topic --num-records 1000000 --throughput -1 --producer-props bootstrap.servers=kafka01:29192,kafka02:29292,kafka03:29392 acks=1 linger.ms=50 --record-size 1000
$ .\kafka-consumer-groups.bat --bootstrap-server kafka01:29192,kafka02:29292,kafka03:29392 --group my-group1 --describe