Running the currency price 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 recipes 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/doubloon/ProcessingApp.java
and fill it with the following code:
package doubloon; 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 goodTopic = args[3]; String badTopic = args[4]; Reader reader = new Reader(servers, groupId, sourceTopic); Enricher enricher = new Enricher(servers, goodTopic, badTopic); reader.run(enricher); } }
How it works...
The ProcessingApp...