Class AbstractKafkaBackOffManagerFactory
java.lang.Object
org.springframework.kafka.listener.AbstractKafkaBackOffManagerFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,KafkaBackOffManagerFactory
- Direct Known Subclasses:
ContainerPartitionPausingBackOffManagerFactory
public abstract class AbstractKafkaBackOffManagerFactory
extends Object
implements KafkaBackOffManagerFactory, org.springframework.context.ApplicationContextAware
Base class for
KafkaBackOffManagerFactory implementations.- Since:
- 2.7
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance that will retrieve theListenerContainerRegistryfrom theApplicationContext.AbstractKafkaBackOffManagerFactory(ListenerContainerRegistry listenerContainerRegistry) Creates an instance with the providedListenerContainerRegistry, which will be used to fetch theMessageListenerContainerto back off. -
Method Summary
Modifier and TypeMethodDescriptioncreate()protected abstract KafkaConsumerBackoffManagerdoCreateManager(ListenerContainerRegistry registry) protected <T> Tprotected ListenerContainerRegistryfinal voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetListenerContainerRegistry(ListenerContainerRegistry listenerContainerRegistry) Sets theListenerContainerRegistry, that will be used to fetch theMessageListenerContainerto back off.
-
Constructor Details
-
AbstractKafkaBackOffManagerFactory
public AbstractKafkaBackOffManagerFactory()Creates an instance that will retrieve theListenerContainerRegistryfrom theApplicationContext. -
AbstractKafkaBackOffManagerFactory
Creates an instance with the providedListenerContainerRegistry, which will be used to fetch theMessageListenerContainerto back off.- Parameters:
listenerContainerRegistry- the listenerContainerRegistry to use.
-
-
Method Details
-
setListenerContainerRegistry
Sets theListenerContainerRegistry, that will be used to fetch theMessageListenerContainerto back off.- Parameters:
listenerContainerRegistry- the listenerContainerRegistry to use.
-
create
- Specified by:
createin interfaceKafkaBackOffManagerFactory
-
doCreateManager
-
getListenerContainerRegistry
-
getBean
-
setApplicationContext
public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-