Now that the final version of the Enricher class is coded, we have to compile and execute it.
As we know, the ProcessingEngine class contains the main method to coordinate the reader and writer classes. Now, let's modify the ProcessingEngine.java file on the src/main/java/monedero/ directory and replace Validator with Enricher as in the highlighted code in Listing 3.6:
package monedero;
public class ProcessingEngine {
public static void main(String[] args){
String servers = args[0];
String groupId = args[1];
String sourceTopic = args[2];
String validTopic = args[3];
String invalidTopic = args[4];
Reader reader = new Reader(servers, groupId, sourceTopic);
Enricher enricher = new Enricher(servers, validTopic, invalidTopic);
reader.run(enricher);
}
}
Listing 3.6: ProcessingEngine.java
The processing engine receives the following five...