Class KafkaStreamsFactory
java.lang.Object
io.micronaut.configuration.kafka.streams.KafkaStreamsFactory
- All Implemented Interfaces:
io.micronaut.runtime.graceful.GracefulShutdownCapable, Closeable, AutoCloseable
@Factory
@Requires(property="kafka.streams.enabled",
notEquals="false",
defaultValue="true")
public class KafkaStreamsFactory
extends Object
implements Closeable, io.micronaut.runtime.graceful.GracefulShutdownCapable
A factory that constructs the
KafkaStreams bean.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorsConstructorDescriptionKafkaStreamsFactory(io.micronaut.context.event.ApplicationEventPublisher eventPublisher, io.micronaut.context.ApplicationContext applicationContext) Default constructor. -
Method Summary
-
Constructor Details
-
KafkaStreamsFactory
public KafkaStreamsFactory(io.micronaut.context.event.ApplicationEventPublisher eventPublisher, io.micronaut.context.ApplicationContext applicationContext) Default constructor.- Parameters:
eventPublisher- The event publisherapplicationContext- The application context
-
-
Method Details
-
getStreams
Get configured stream and builder for the stream.- Returns:
- Map of streams to builders
-
shutdownGracefully
- Specified by:
shutdownGracefullyin interfaceio.micronaut.runtime.graceful.GracefulShutdownCapable
-
reportActiveTasks
- Specified by:
reportActiveTasksin interfaceio.micronaut.runtime.graceful.GracefulShutdownCapable
-
close
@PreDestroy public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-