Check the blog for more details
git clone https://github.com/abhirockzz/kafka-websocket.git
cd dashboard
andmvn clean install
- createskafka-websocket.war
intarget
directorycd producer
andmvn clean install
- createskafka-producer.jar
intarget
directorycd ..
anddocker-compose up --build
- starts Kafka, Zookeeper, Payara and Producer containers (you can switch to any other Java EE runtime)- Kafka accessible @
9092
- Zookeeper @
2181
- Producer starts pushing records to Kafka topics (auto creates topic-1, topic-2)
- Port
8080
exposed from Payara container
- Kafka accessible @
Wait for the containers to startup before you move to the testing part...
docker-machine ip
- get the IP address of your Docker host. Let's call itAPP_HOST
- Open your browser and go to
http://<APP_HOST>:8080/kafka-websocket/
. Enter topic-1 or topic-2 insubscription
input text box. You will start seeing the records being produced by the producer for that topic- You can open multiple such clients/browser windows/tabs and subscribe to either of these topics
docker-compose down -v
once you're done....