Playframework - Simple Kafka Example Apache Kafka Home
- Scala 2.11.1
- Playframework 2.3.8
- Kafka 2.11_0.8.2.1
- Bootstrap 3.3.2
- AngularJs 1.2.18
What the application does:
- A button (PUT /tick) captures the current server timestamp
- The timestamp is formatted to a json block
- The json is produced to a kafka topic
- The json is consumed from the kafka topic and broadcast to iteratee chanel
- The UI displays a feed of consumed timestamps from the kafka topic (GET /feed/tick)
Screenshot
This application depends upon a running instance of kafka
The server settings and topic name is pulled from application.conf
You can use whatever Kafka server setup you chose.
The simplest way is to follow the Kafka Quick Start
- bin/zookeeper-server-start.sh config/zookeeper.properties
- bin/kafka-server-start.sh config/server.properties
Then create the topic that you set in the config file. By default it is "tick"
- bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic tick
This application is provided under the Apache 2 License

