Class RabbitConnectionFactoryBeanConfigurer
java.lang.Object
org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionFactoryBeanConfigurer
Configures
RabbitConnectionFactoryBean with sensible defaults tuned using
configuration properties.
Can be injected into application code and used to define a custom
RabbitConnectionFactoryBean whose configuration is based upon that produced by
auto-configuration.
- Since:
- 4.2.0
- Author:
- Chris Bono, Moritz Halbritter, Andy Wilkinson, Phillip Webb, Scott Frederick
-
Constructor Summary
ConstructorsConstructorDescriptionRabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties) Creates a new configurer that will use the givenresourceLoaderandproperties.RabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties, RabbitConnectionDetails connectionDetails) Creates a new configurer that will use the givenresourceLoader,properties, andconnectionDetails.RabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties, RabbitConnectionDetails connectionDetails, @Nullable SslBundles sslBundles) Creates a new configurer that will use the givenresourceLoader,properties,connectionDetails, andsslBundles. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(RabbitConnectionFactoryBean factory) Configure the specified rabbit connection factory bean.voidsetCredentialsProvider(@Nullable CredentialsProvider credentialsProvider) voidsetCredentialsRefreshService(@Nullable CredentialsRefreshService credentialsRefreshService)
-
Constructor Details
-
RabbitConnectionFactoryBeanConfigurer
public RabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties) Creates a new configurer that will use the givenresourceLoaderandproperties.- 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
-
RabbitConnectionFactoryBeanConfigurer
public RabbitConnectionFactoryBeanConfigurer(ResourceLoader resourceLoader, RabbitProperties properties, RabbitConnectionDetails connectionDetails, @Nullable SslBundles sslBundles) Creates a new configurer that will use the givenresourceLoader,properties,connectionDetails, andsslBundles. The connection details have priority over the properties.- Parameters:
resourceLoader- the resource loaderproperties- the propertiesconnectionDetails- the connection detailssslBundles- the SSL bundles
-
-
Method Details
-
setCredentialsProvider
-
setCredentialsRefreshService
public void setCredentialsRefreshService(@Nullable CredentialsRefreshService credentialsRefreshService) -
configure
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- theRabbitConnectionFactoryBeaninstance to configure
-