Class RabbitConnectionFactoryBeanConfigurer
java.lang.Object
org.springframework.boot.autoconfigure.amqp.RabbitConnectionFactoryBeanConfigurer
Configures
RabbitConnectionFactoryBean
with sensible defaults.- Since:
- 2.6.0
- Author:
- Chris Bono, Moritz Halbritter, Andy Wilkinson, Phillip Webb
-
Constructor Summary
ConstructorDescriptionRabbitConnectionFactoryBeanConfigurer
(ResourceLoader resourceLoader, RabbitProperties properties) Creates a new configurer that will use the givenresourceLoader
andproperties
.RabbitConnectionFactoryBeanConfigurer
(ResourceLoader resourceLoader, RabbitProperties properties, RabbitConnectionDetails connectionDetails) Creates a new configurer that will use the givenresourceLoader
,properties
, andconnectionDetails
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean factory) Configure the specified rabbit connection factory bean.void
setCredentialsProvider
(com.rabbitmq.client.impl.CredentialsProvider credentialsProvider) void
setCredentialsRefreshService
(com.rabbitmq.client.impl.CredentialsRefreshService credentialsRefreshService)
-
Constructor Details
-
RabbitConnectionFactoryBeanConfigurer
public RabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties) Creates a new configurer that will use the givenresourceLoader
andproperties
.- Parameters:
resourceLoader
- the resource loaderproperties
- the properties
-
RabbitConnectionFactoryBeanConfigurer
public RabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties, RabbitConnectionDetails connectionDetails) Creates a new configurer that will use the givenresourceLoader
,properties
, andconnectionDetails
. The connection details have priority over the properties.- Parameters:
resourceLoader
- the resource loaderproperties
- the propertiesconnectionDetails
- the connection details.- Since:
- 3.1.0
-
-
Method Details
-
setCredentialsProvider
public void setCredentialsProvider(com.rabbitmq.client.impl.CredentialsProvider credentialsProvider) -
setCredentialsRefreshService
public void setCredentialsRefreshService(com.rabbitmq.client.impl.CredentialsRefreshService credentialsRefreshService) -
configure
public void configure(org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean factory) Configure the specified rabbit connection factory bean. The factory bean can be further tuned and default settings can be overridden. It is the responsibility of the caller to invokeRabbitConnectionFactoryBean.afterPropertiesSet()
though.- Parameters:
factory
- theRabbitConnectionFactoryBean
instance to configure
-