Class WaitForSourceTopicsInterceptor
- java.lang.Object
-
- io.streamthoughts.azkarra.runtime.interceptors.WaitForSourceTopicsInterceptor
-
- All Implemented Interfaces:
StreamsLifecycleInterceptor
public class WaitForSourceTopicsInterceptor extends Object implements StreamsLifecycleInterceptor
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
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
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
-
onStart
public void onStart(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being started.- Specified by:
onStart
in interfaceStreamsLifecycleInterceptor
chain
- theStreamsLifecycleChain
instance.
-
-