Now, in the src/main/java/kioto/plain directory, create a file called PlainProcessor.java with the content of Listing 4.9.
The following is the content of Listing 4.9, PlainProcessor.java (part 1):
package kioto.plain;
import ...
public final class PlainProcessor {
private Consumer<String, String> consumer;
private Producer<String, String> producer;
public PlainProcessor(String brokers) {
Properties consumerProps = new Properties();
consumerProps.put("bootstrap.servers", brokers);
consumerProps.put("group.id", "healthcheck-processor");
consumerProps.put("key.deserializer", StringDeserializer.class);
consumerProps.put("value.deserializer", StringDeserializer.class);
consumer = new KafkaConsumer<>(consumerProps);
Properties producerProps = new Properties();
producerProps...