Running the location temperature enricher
In the previous recipe, the final version of the Enricher
class was coded. Now, in this recipe, everything is compiled and executed.
Getting ready
The execution of the previous recipe in this chapter is needed.
How to do it...
The ProcessingApp
class coordinates the Reader
and Writer
classes. It contains the main
method to execute them. Create a new file called src/main/java/treu/ProcessingApp.java
and fill it with the following code:
package treu; import java.io.IOException; public class ProcessingApp { public static void main(String[] args) throws IOException{ String servers = args[0]; String groupId = args[1]; String sourceTopic = args[2]; String enrichedTopic = args[3]; Reader reader = new Reader(servers, groupId, sourceTopic); Enricher enricher = new Enricher(servers, goodTopic, enrichedTopic); reader.run(enricher); } }
How it works...
The ProcessingApp
receives four arguments...