Package com.bakdata.kafka.streams
Class StreamsRunner
java.lang.Object
com.bakdata.kafka.streams.StreamsRunner
- All Implemented Interfaces:
Runner,AutoCloseable,Runnable
Runs a Kafka Streams application
-
Constructor Summary
ConstructorsConstructorDescriptionStreamsRunner(@NonNull org.apache.kafka.streams.Topology topology, @NonNull org.apache.kafka.streams.StreamsConfig config) Create aStreamsRunnerwith defaultStreamsExecutionOptionsStreamsRunner(@NonNull org.apache.kafka.streams.Topology topology, @NonNull org.apache.kafka.streams.StreamsConfig config, @NonNull StreamsExecutionOptions options) Create aStreamsRunner -
Method Summary
-
Constructor Details
-
StreamsRunner
public StreamsRunner(@NonNull @NonNull org.apache.kafka.streams.Topology topology, @NonNull @NonNull org.apache.kafka.streams.StreamsConfig config) Create aStreamsRunnerwith defaultStreamsExecutionOptions- Parameters:
topology- topology to be executedconfig- streams configuration
-
StreamsRunner
public StreamsRunner(@NonNull @NonNull org.apache.kafka.streams.Topology topology, @NonNull @NonNull org.apache.kafka.streams.StreamsConfig config, @NonNull @NonNull StreamsExecutionOptions options) Create aStreamsRunner- Parameters:
topology- topology to be executedconfig- streams configurationoptions- options to customizeKafkaStreamsbehavior
-
-
Method Details
-
run
public void run()Run the Streams application. This method blocks until Kafka Streams has completed shutdown, either because it caught an error orclose()has been called. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRunner
-