The application consumes lines from Kafka topic. The application counts the number of lines and rate at which it reads them.

The application doesn't use the advanced features of Spark so it may not panellize very nicely. Spark breaks operations up into segments and passes the work to the worker nodes. More complex tasks (e.g. word counts, parsing) would likely be better use case for Spark.

Compile the application. These are Maven projects so hopefully it will compile without too much difficulty.

Simulator
For testing you can you the Simulator to send messages to Kafka.