Class RabbitTemplateConfigurer
java.lang.Object
org.springframework.boot.autoconfigure.amqp.RabbitTemplateConfigurer
Configure 
RabbitTemplate with sensible defaults tuned using configuration
 properties.
 
 Can be injected into application code and used to define a custom
 RabbitTemplate whose configuration is based upon that produced by
 auto-configuration.
- Since:
- 2.3.0
- Author:
- Stephane Nicoll, Yanming Zhou
- 
Constructor SummaryConstructorsConstructorDescriptionRabbitTemplateConfigurer(RabbitProperties rabbitProperties) Creates a new configurer that will use the givenrabbitProperties.
- 
Method SummaryModifier 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- 
RabbitTemplateConfigurerCreates a new configurer that will use the givenrabbitProperties.- Parameters:
- rabbitProperties- properties to use
- Since:
- 2.6.0
 
 
- 
- 
Method Details- 
setMessageConverterpublic void setMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverterto use ornullif the out-of-the-box converter should be used.- Parameters:
- messageConverter- the- MessageConverter
- Since:
- 2.6.0
 
- 
setRetryTemplateCustomizerspublic void setRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizerinstances to use.- Parameters:
- retryTemplateCustomizers- the retry template customizers
- Since:
- 2.6.0
 
- 
getRabbitProperties
- 
configurepublic 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- the- RabbitTemplateinstance to configure
- connectionFactory- the- ConnectionFactoryto use
 
 
-