Running the engine

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 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); ...

Get Apache Kafka Quick Start Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.