Class RabbitTemplateConfigurer
java.lang.Object
org.springframework.boot.autoconfigure.amqp.RabbitTemplateConfigurer
Configure
RabbitTemplate
with sensible defaults.- Since:
- 2.3.0
- Author:
- Stephane Nicoll, Yanming Zhou
-
Constructor Summary
ConstructorDescriptionRabbitTemplateConfigurer
(RabbitProperties rabbitProperties) Creates a new configurer that will use the givenrabbitProperties
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(org.springframework.amqp.rabbit.core.RabbitTemplate template, org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) Configure the specifiedRabbitTemplate
.protected final RabbitProperties
void
setMessageConverter
(org.springframework.amqp.support.converter.MessageConverter messageConverter) Set theMessageConverter
to use ornull
if the out-of-the-box converter should be used.void
setRetryTemplateCustomizers
(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizer
instances 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 theMessageConverter
to use ornull
if the out-of-the-box converter should be used.- Parameters:
messageConverter
- theMessageConverter
- Since:
- 2.6.0
-
setRetryTemplateCustomizers
public void setRetryTemplateCustomizers(List<RabbitRetryTemplateCustomizer> retryTemplateCustomizers) Set theRabbitRetryTemplateCustomizer
instances 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
- theRabbitTemplate
instance to configureconnectionFactory
- theConnectionFactory
to use
-