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
ConstructorsModifierConstructorDescriptionprotectedAbstractRabbitListenerContainerFactoryConfigurer(RabbitProperties rabbitProperties) Creates a new configurer that will use the givenrabbitProperties. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidconfigure(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specified rabbit listener container factory.protected voidconfigure(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, RabbitProperties.AmqpContainer configuration) protected final RabbitPropertiesprotected voidsetMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverterto use ornullif the out-of-the-box converter should be used.protected voidsetMessageRecoverer(org.springframework.amqp.rabbit.retry.MessageRecoverer messageRecoverer) Set theMessageRecovererto use ornullto rely on the default.protected voidsetRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.voidsetTaskExecutor(Executor taskExecutor) Set the task executor 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 theMessageConverterto use ornullif the out-of-the-box converter should be used.- Parameters:
messageConverter- theMessageConverter
-
setMessageRecoverer
protected void setMessageRecoverer(org.springframework.amqp.rabbit.retry.MessageRecoverer messageRecoverer) Set theMessageRecovererto use ornullto rely on the default.- Parameters:
messageRecoverer- theMessageRecoverer
-
setRetryTemplateCustomizers
protected void setRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.- Parameters:
retryTemplateCustomizers- the retry template customizers
-
setTaskExecutor
Set the task executor to use.- Parameters:
taskExecutor- the task executor- Since:
- 3.2.0
-
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- theAbstractRabbitListenerContainerFactoryinstance to configureconnectionFactory- theConnectionFactoryto use
-
configure
protected void configure(T factory, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, RabbitProperties.AmqpContainer configuration)
-