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 java.lang.Object implements KafkaBackOffManagerFactory, org.springframework.context.ApplicationContextAware
Base class forKafkaBackOffManagerFactoryimplementations.- Since:
- 2.7
- Author:
- Tomaz Fernandes, Gary Russell
- See Also:
KafkaConsumerBackoffManager
-
-
Constructor Summary
Constructors Constructor Description AbstractKafkaBackOffManagerFactory()Creates 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description KafkaConsumerBackoffManagercreate()protected abstract KafkaConsumerBackoffManagerdoCreateManager(ListenerContainerRegistry registry)protected <T> TgetBean(java.lang.String beanName, java.lang.Class<T> beanClass)protected ListenerContainerRegistrygetListenerContainerRegistry()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetListenerContainerRegistry(ListenerContainerRegistry listenerContainerRegistry)Sets theListenerContainerRegistry, that will be used to fetch theMessageListenerContainerto back off.
-
-
-
Constructor Detail
-
AbstractKafkaBackOffManagerFactory
public AbstractKafkaBackOffManagerFactory()
Creates an instance that will retrieve theListenerContainerRegistryfrom theApplicationContext.
-
AbstractKafkaBackOffManagerFactory
public AbstractKafkaBackOffManagerFactory(ListenerContainerRegistry listenerContainerRegistry)
Creates an instance with the providedListenerContainerRegistry, which will be used to fetch theMessageListenerContainerto back off.- Parameters:
listenerContainerRegistry- the listenerContainerRegistry to use.
-
-
Method Detail
-
setListenerContainerRegistry
public void setListenerContainerRegistry(ListenerContainerRegistry listenerContainerRegistry)
Sets theListenerContainerRegistry, that will be used to fetch theMessageListenerContainerto back off.- Parameters:
listenerContainerRegistry- the listenerContainerRegistry to use.
-
create
public KafkaConsumerBackoffManager create()
- Specified by:
createin interfaceKafkaBackOffManagerFactory
-
doCreateManager
protected abstract KafkaConsumerBackoffManager doCreateManager(ListenerContainerRegistry registry)
-
getListenerContainerRegistry
protected ListenerContainerRegistry getListenerContainerRegistry()
-
getBean
protected <T> T getBean(java.lang.String beanName, java.lang.Class<T> beanClass)
-
setApplicationContext
public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
-