Running the streaming application
In the previous recipe, the first version of the streaming app was coded. Now, in this recipe, everything is compiled and executed.
Getting ready
The execution of the previous recipe of this chapter is needed.
How to do it...
The streaming app doesn't receive arguments from the command line:
- To build the project, from the
treu
directory, run the following command:
$ gradle jar
If everything is OK, the output should be:
...BUILD SUCCESSFULTotal time: ...
- To run the project, we have four different command-line windows. The following diagram shows what the arrangement of command-line windows should look like:
Figure 6.1: The four Terminals to test the streaming application—Confluent Control Center, Message producer, Message consumer, and the application itself
- In the first command-line Terminal, run the control center:
$ <confluent-path>/bin/confluent start
- In the second command-line Terminal, create the two topics needed:
$ bin/kafka-topics --create --topic src-topic...