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
ConstructorDescriptionCreates an instance that will retrieve theListenerContainerRegistry
from theApplicationContext
.AbstractKafkaBackOffManagerFactory
(ListenerContainerRegistry listenerContainerRegistry) Creates an instance with the providedListenerContainerRegistry
, which will be used to fetch theMessageListenerContainer
to back off. -
Method Summary
Modifier and TypeMethodDescriptioncreate()
protected abstract KafkaConsumerBackoffManager
doCreateManager
(ListenerContainerRegistry registry) protected <T> T
protected ListenerContainerRegistry
final void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setListenerContainerRegistry
(ListenerContainerRegistry listenerContainerRegistry) Sets theListenerContainerRegistry
, that will be used to fetch theMessageListenerContainer
to back off.
-
Constructor Details
-
AbstractKafkaBackOffManagerFactory
public AbstractKafkaBackOffManagerFactory()Creates an instance that will retrieve theListenerContainerRegistry
from theApplicationContext
. -
AbstractKafkaBackOffManagerFactory
Creates an instance with the providedListenerContainerRegistry
, which will be used to fetch theMessageListenerContainer
to back off.- Parameters:
listenerContainerRegistry
- the listenerContainerRegistry to use.
-
-
Method Details
-
setListenerContainerRegistry
Sets theListenerContainerRegistry
, that will be used to fetch theMessageListenerContainer
to back off.- Parameters:
listenerContainerRegistry
- the listenerContainerRegistry to use.
-
create
- Specified by:
create
in interfaceKafkaBackOffManagerFactory
-
doCreateManager
-
getListenerContainerRegistry
-
getBean
-
setApplicationContext
public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-