-
Notifications
You must be signed in to change notification settings - Fork 23
Connect
RabbitBus provides three methods for establishing a connection to a RabbitMQ server instance:
-
Connect(string amqpUri, TimeSpan timeout)
Connects to the RabbitMQ instance designated by a properly formatted [AMQP URI] (http://www.rabbitmq.com/uri-spec.html) with recurring reconnection attempts at an interval of 10 seconds if the RabbitMQ broker is currently unavailable.
-
Connect(string amqpUri)
Connects to the RabbitMQ instance designated by a properly formatted AMQP URI with a default reconnection timeout value of 30 seconds.
-
Connect()
Connects to the default virtual host on localhost using user Id: guest, password: guest with a default reconnection timeout value of 30 seconds.
The the following is an example usage which is equivalent to calling Connect()
:
bus.Connect("amqp://guest:guest@localhost:5672/%2f", TimeSpan.FromSeconds(30));