Now, in the src/main/java/kioto/plain directory, create a file called PlainStreamsProcessor.java with the contents of Listing 6.2, shown as follows:
import ...public final class PlainStreamsProcessor { private final String brokers; public PlainStreamsProcessor(String brokers) { super(); this.brokers = brokers; } public final void process() { // below we will see the contents of this method } public static void main(String[] args) { (new PlainStreamsProcessor("localhost:9092")).process(); }}
All the magic happens inside the process() method. The first step in a Kafka Streams application is to get a StreamsBuilder instance, as shown in the following code:
StreamsBuilder streamsBuilder ...