Java PlainProcessor

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.9PlainProcessor.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 ...

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.