Class RabbitTemplateConfigurer
java.lang.Object
org.springframework.boot.autoconfigure.amqp.RabbitTemplateConfigurer
Configure
RabbitTemplate with sensible defaults.- Since:
- 2.3.0
- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsConstructorDescriptionRabbitTemplateConfigurer(RabbitProperties rabbitProperties) Creates a new configurer that will use the givenrabbitProperties. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.springframework.amqp.rabbit.core.RabbitTemplate template, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specifiedRabbitTemplate.protected final RabbitPropertiesvoidsetMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverterto use ornullif the out-of-the-box converter should be used.voidsetRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.
-
Constructor Details
-
RabbitTemplateConfigurer
Creates a new configurer that will use the givenrabbitProperties.- Parameters:
rabbitProperties- properties to use- Since:
- 2.6.0
-
-
Method Details
-
setMessageConverter
public 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- Since:
- 2.6.0
-
setRetryTemplateCustomizers
public void setRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.- Parameters:
retryTemplateCustomizers- the retry template customizers- Since:
- 2.6.0
-
getRabbitProperties
-
configure
public void configure(org.springframework.amqp.rabbit.core.RabbitTemplate template, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specifiedRabbitTemplate. The template can be further tuned and default settings can be overridden.- Parameters:
template- theRabbitTemplateinstance to configureconnectionFactory- theConnectionFactoryto use
-