Class SimpleConnectionFactoryBuilder
- Direct Known Subclasses:
BasicConnectionFactoryBuilder
This is the simplest connection factory possible; everything required to connect must be specified as part of the broker-url. In the
event that you want to have obfuscated passwords then you want to use BasicConnectionFactoryBuilder instead.
If you don't override the username and password in the broker-url then it's likely to default to guest/guest which is the
underlying SDK default.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.rabbitmq.client.ConnectionFactorybuild()Build the connection factory.The RabbitMQ Broker URL.voidsetBrokerUrl(String brokerUrl) The RabbitMQ Broker URL.<T extends SimpleConnectionFactoryBuilder>
T
-
Constructor Details
-
SimpleConnectionFactoryBuilder
public SimpleConnectionFactoryBuilder()
-
-
Method Details
-
build
Description copied from class:ConnectionFactoryBuilderBuild the connection factory.- Specified by:
buildin classConnectionFactoryBuilder- Throws:
Exception
-
withBrokerUrl
-
setBrokerUrl
The RabbitMQ Broker URL.Everything including the username and password may be defined on the broker url so you can configure something like
amqp://admin:admin@localhost:5672/vhostas required.Since you may well have sensitive information in the URL, you can also use the external
%sysprop{}and%env{}syntax in order to derive the broker URL from system properties or the environment, so %env{CLOUDAMQP_URL} is perfectly reasonable. -
getBrokerUrl
The RabbitMQ Broker URL.Everything including the username and password may be defined on the broker url so you can configure something like
amqp://admin:admin@localhost:5672/vhostas required.Since you may well have sensitive information in the URL, you can also use the external
%sysprop{}and%env{}syntax in order to derive the broker URL from system properties or the environment, so %env{CLOUDAMQP_URL} is perfectly reasonable.
-