To build the project, run the following command from the kioto directory:
$ gradle jar
If everything is correct, the output is something like the following:
BUILD SUCCESSFUL in 3s
1 actionable task: 1 executed
- Our broker is running on port 9092, so to create the uptimes topic, execute the following command:
$ ./bin/kafka-topics --zookeeper localhost:2181 --create --topic
uptimes --replication-factor 1 --partitions 4
- Run a console consumer for the uptimes topic, as follows:
$ ./bin/kafka-console-consumer --bootstrap-server localhost:9092
--topic uptimes --property print.key=true
- From our IDE, run the main method of PlainProcessor
- From our IDE, run the main method of PlainProducer
- The output on the console consumer for the uptimes topic should be similar to the following:
EW05-HV36 33
BO58-SB28 20
DV03-ZT93 46
...
We have said that, when producing...