Add support for ConnectionNameStrategy

This commit detects if a `ConnectionNameStrategy` bean exists in the
context and associates it with the auto-configured RabbitMQ's
`ConnectionFactory` when that is the case.

Closes gh-12367
This commit is contained in:
Stephane Nicoll
2018-03-07 11:15:50 +01:00
parent bc47b715c3
commit 42629cb8ae
3 changed files with 50 additions and 3 deletions

View File

@@ -5187,8 +5187,10 @@ RabbitMQ configuration is controlled by external configuration properties in
spring.rabbitmq.password=secret
----
See {sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[`RabbitProperties`]
for more of the supported options.
If a `ConnectionNameStrategy` bean exists in the context, it will be automatically used to
name connections created by the auto-configured `ConnectionFactory`. See
{sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[`RabbitProperties`] for more
of the supported options.
TIP: See
https://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding