Extract RabbitTemplate auto-configuration in a configurer

This commit movers the auto-configuration of RabbitTemplate to a
dedicated class that can be reused to create additional template with
similar settings.

CLoses gh-19440
This commit is contained in:
Stephane Nicoll
2019-12-28 10:56:04 +01:00
parent 015714c1d6
commit bb5e09882a
4 changed files with 144 additions and 27 deletions

View File

@@ -5131,6 +5131,8 @@ To retry operations, you can enable retries on the `AmqpTemplate` (for example,
Retries are disabled by default.
You can also customize the `RetryTemplate` programmatically by declaring a `RabbitRetryTemplateCustomizer` bean.
If you need to create more `RabbitTemplate` instances or if you want to override the default, Spring Boot provides a `RabbitTemplateConfigurer` bean that you can use to initialize a `RabbitTemplate` with the same settings as the factories used by the auto-configuration.
[[boot-features-using-amqp-receiving]]