Skip to content

vetler/websockets-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status websockets-kafka

An experiment to let web pages access Apache Kafka through Javascript and WebSockets.

Apache Kafka

Start Apache Kafka, as described in the quickstart. The Zookeeper configuration in the server is not yet configurable, so it is important that it is running on the default port.

Server

To start the server, run the main method in the KafkaWebSocketServer object. You can do this by running SBT like this:

sbt "project server" run

Client

To start the client, run the main method in the ConsumerClientServer. You can do this by running SBT like this:

sbt "project client" run

Point your browser to localhost:8080. There is not really a UI yet, but check the Javascript console, and messages will appear as they are received.

Sending messages

To send messages, just use kafka-console-producer.sh:

bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testing-topic

Each line you type will be echoed in the browser.

About

An experiment to let web pages access Apache Kafka through Javascript and WebSockets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published