https://github.com/abhirockzz/kafka-websocket
kafEEne: Kafka + Websocket
https://github.com/abhirockzz/kafka-websocket
docker javaee jsonb jsr356 kafeene kafka websocket
Last synced: about 1 year ago
JSON representation
kafEEne: Kafka + Websocket
- Host: GitHub
- URL: https://github.com/abhirockzz/kafka-websocket
- Owner: abhirockzz
- Created: 2017-05-22T10:16:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-22T11:02:21.000Z (about 9 years ago)
- Last Synced: 2025-03-24T00:24:36.459Z (about 1 year ago)
- Topics: docker, javaee, jsonb, jsr356, kafeene, kafka, websocket
- Language: Java
- Homepage: https://abhirockzz.wordpress.com/2017/05/22/kafeene-1-websocket-kafka
- Size: 43.9 KB
- Stars: 23
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Check [the blog](https://abhirockzz.wordpress.com/2017/05/22/kafeene-1-websocket-kafka) for more details
## Start with Docker Compose
- `git clone https://github.com/abhirockzz/kafka-websocket.git`
- `cd dashboard` and `mvn clean install` - creates `kafka-websocket.war` in `target` directory
- `cd producer` and `mvn clean install` - creates `kafka-producer.jar` in `target` directory
- `cd ..` and `docker-compose up --build` - starts Kafka, Zookeeper, Payara and Producer containers (you can switch to any other [Java EE runtime](https://github.com/abhirockzz/kafka-websocket/blob/master/dashboard/Dockerfile#L1))
- Kafka accessible @ `9092`
- Zookeeper @ `2181`
- Producer starts pushing records to Kafka topics (auto creates topic-1, topic-2)
- Port `8080` exposed from Payara container
Wait for the containers to startup before you move to the testing part...
## Test
- `docker-machine ip` - get the IP address of your Docker host. Let's call it `APP_HOST`
- Open your browser and go to `http://:8080/kafka-websocket/`. Enter topic-1 or topic-2 in `subscription` 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....