Class WaitForSourceTopicsInterceptor
- java.lang.Object
-
- io.streamthoughts.azkarra.runtime.interceptors.WaitForSourceTopicsInterceptor
-
- All Implemented Interfaces:
Configurable
,StreamsLifecycleInterceptor
public class WaitForSourceTopicsInterceptor extends Object implements StreamsLifecycleInterceptor, Configurable
ThisStreamsLifecycleInterceptor
waits for source topics to be created before starting the streams instance. Kafka Streams fails if one of the source topic is missing (error: INCOMPLETE_SOURCE_TOPIC_METADATA);
-
-
Constructor Summary
Constructors Constructor Description WaitForSourceTopicsInterceptor()
Creates a newWaitForSourceTopicsInterceptor
instance.WaitForSourceTopicsInterceptor(org.apache.kafka.clients.admin.AdminClient adminClient)
Creates a newWaitForSourceTopicsInterceptor
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Conf configuration)
Configures this instance with the specifiedConf
.void
onStart(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being started.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.streamthoughts.azkarra.api.StreamsLifecycleInterceptor
name, onStop
-
-
-
-
Constructor Detail
-
WaitForSourceTopicsInterceptor
public WaitForSourceTopicsInterceptor()
Creates a newWaitForSourceTopicsInterceptor
instance.
-
WaitForSourceTopicsInterceptor
public WaitForSourceTopicsInterceptor(org.apache.kafka.clients.admin.AdminClient adminClient)
Creates a newWaitForSourceTopicsInterceptor
instance.- Parameters:
adminClient
- theAdminClient
to be used.
-
-
Method Detail
-
configure
public void configure(Conf configuration)
Configures this instance with the specifiedConf
.- Specified by:
configure
in interfaceConfigurable
- Parameters:
configuration
- theConf
instance used to configure this instance.
-
onStart
public void onStart(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being started.- Specified by:
onStart
in interfaceStreamsLifecycleInterceptor
chain
- theStreamsLifecycleChain
instance.
-
-