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 O’Reilly online learning.

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