Class AbstractRabbitListenerContainerFactoryConfigurer<T extends org.springframework.amqp.rabbit.config.AbstractRabbitListenerContainerFactory<?>>
java.lang.Object
org.springframework.boot.autoconfigure.amqp.AbstractRabbitListenerContainerFactoryConfigurer<T>
- Type Parameters:
T
- the container factory type.
- Direct Known Subclasses:
DirectRabbitListenerContainerFactoryConfigurer
,SimpleRabbitListenerContainerFactoryConfigurer
public abstract class AbstractRabbitListenerContainerFactoryConfigurer<T extends org.springframework.amqp.rabbit.config.AbstractRabbitListenerContainerFactory<?>>
extends Object
Configure
RabbitListenerContainerFactory
with sensible defaults.- Since:
- 2.0.0
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractRabbitListenerContainerFactoryConfigurer
(RabbitProperties rabbitProperties) Creates a new configurer that will use the givenrabbitProperties
. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
configure
(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specified rabbit listener container factory.protected void
configure
(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, RabbitProperties.AmqpContainer configuration) protected final RabbitProperties
protected void
setMessageConverter
(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverter
to use ornull
if the out-of-the-box converter should be used.protected void
setMessageRecoverer
(org.springframework.amqp.rabbit.retry.MessageRecoverer messageRecoverer) Set theMessageRecoverer
to use ornull
to rely on the default.protected void
setRetryTemplateCustomizers
(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizer
instances to use.
-
Constructor Details
-
AbstractRabbitListenerContainerFactoryConfigurer
Creates a new configurer that will use the givenrabbitProperties
.- Parameters:
rabbitProperties
- properties to use- Since:
- 2.6.0
-
-
Method Details
-
setMessageConverter
protected void setMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverter
to use ornull
if the out-of-the-box converter should be used.- Parameters:
messageConverter
- theMessageConverter
-
setMessageRecoverer
protected void setMessageRecoverer(org.springframework.amqp.rabbit.retry.MessageRecoverer messageRecoverer) Set theMessageRecoverer
to use ornull
to rely on the default.- Parameters:
messageRecoverer
- theMessageRecoverer
-
setRetryTemplateCustomizers
protected void setRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizer
instances to use.- Parameters:
retryTemplateCustomizers
- the retry template customizers
-
getRabbitProperties
-
configure
public abstract void configure(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specified rabbit listener container factory. The factory can be further tuned and default settings can be overridden.- Parameters:
factory
- theAbstractRabbitListenerContainerFactory
instance to configureconnectionFactory
- theConnectionFactory
to use
-
configure
protected void configure(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, RabbitProperties.AmqpContainer configuration)
-