Running the validation

At the moment, the ProcessingEngine class coordinates the Reader and Writer classes. It contains the main method to coordinate them. We have to edit the ProcessingEngine class located in the src/main/java/monedero/ directory and change Writer with Validator, as in Listing 2.10.

The following is the content of Listing 2.10, ProcessingEngine.java:

package monedero;public class ProcessingEngine {  public static void main(String[] args) {    String servers = args[0];    String groupId = args[1];    String inputTopic = args[2];    String validTopic = args[3];    String invalidTopic = args[4];    Reader reader = new Reader(servers, groupId, inputTopic);    Validator validator = new Validator(servers, validTopic, invalidTopic); reader.run(validator); ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.