Skip to content

abhishekkarigar/docker_kafka_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

docker_kafka_demo


pre-requisite

create two docker nodes
$ docker-machine create manager1
$ docker-machine create worker1

create swarm node
$ docker-machine ssh manager1
$ docker swarm init --advertise-addr <manager1_ip>

$ docker-machine ssh worker1
$ docker-machine join-token (worker|manager)

$ docker-machine env manager1

in windows C:\Windows\System32\drivers\etc\hosts

< manager1_ip > manager1
< worker1_ip > worker1


deploy the docker file

$ docker stack deploy --compose-file docker-compose.yaml stacker
$ docker ps -a
$ docker stack services stacker
$ docker stack ps stacker


ssh into kafka container

$ docker exec -it <kafka_container_id> sh
# kafka-console-producer.sh --borker-list localhost:9092 --topic myTopic
>


from local windows command line

install kafka on windows

> .\bin\windows\kafka-console-consumer.bat --bootstrap-server manager1:9094 --topic myTopic --from-beginning

About

this project demonstrates the use of kafka with docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published