Interface IConnectionFactory
Namespace: RabbitMQ.Client
Assembly: RabbitMQ.Client.dll
Syntax
public interface IConnectionFactory
Properties
| Edit this page View SourceClientProperties
Dictionary of client properties to be sent to the server.
Declaration
IDictionary<string, object> ClientProperties { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<string, object> |
ClientProvidedName
Default client provided name to be used for connections.
Declaration
string ClientProvidedName { get; set; }
Property Value
Type | Description |
---|---|
string |
ContinuationTimeout
Amount of time protocol operations (e.g.
queue.declare
) are allowed to take before
timing out.
Declaration
TimeSpan ContinuationTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
CredentialsProvider
Default CredentialsProvider implementation. If set, this overrides UserName / Password
Declaration
ICredentialsProvider CredentialsProvider { get; set; }
Property Value
Type | Description |
---|---|
ICredentialsProvider |
CredentialsRefresher
Declaration
ICredentialsRefresher CredentialsRefresher { get; set; }
Property Value
Type | Description |
---|---|
ICredentialsRefresher |
HandshakeContinuationTimeout
Amount of time protocol handshake operations are allowed to take before timing out.
Declaration
TimeSpan HandshakeContinuationTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Password
Password to use when authenticating to the server.
Declaration
string Password { get; set; }
Property Value
Type | Description |
---|---|
string |
RequestedChannelMax
Maximum channel number to ask for.
Declaration
ushort RequestedChannelMax { get; set; }
Property Value
Type | Description |
---|---|
ushort |
RequestedFrameMax
Frame-max parameter to ask for (in bytes).
Declaration
uint RequestedFrameMax { get; set; }
Property Value
Type | Description |
---|---|
uint |
RequestedHeartbeat
Heartbeat setting to request.
Declaration
TimeSpan RequestedHeartbeat { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Uri
Sets or gets the AMQP Uri to be used for connections.
Declaration
Uri Uri { get; set; }
Property Value
Type | Description |
---|---|
Uri |
UseBackgroundThreadsForIO
When set to true, background threads will be used for I/O and heartbeats.
Declaration
bool UseBackgroundThreadsForIO { get; set; }
Property Value
Type | Description |
---|---|
bool |
UserName
Username to use when authenticating to the server.
Declaration
string UserName { get; set; }
Property Value
Type | Description |
---|---|
string |
VirtualHost
Virtual host to access during this connection.
Declaration
string VirtualHost { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceAuthMechanismFactory(IList<string>)
Given a list of mechanism names supported by the server, select a preferred mechanism, or null if we have none in common.
Declaration
IAuthMechanismFactory AuthMechanismFactory(IList<string> mechanismNames)
Parameters
Type | Name | Description |
---|---|---|
IList<string> | mechanismNames |
Returns
Type | Description |
---|---|
IAuthMechanismFactory |
CreateConnection()
Create a connection to the specified endpoint.
Declaration
IConnection CreateConnection()
Returns
Type | Description |
---|---|
IConnection |
CreateConnection(IList<AmqpTcpEndpoint>)
Create a connection using a list of endpoints. The selection behaviour can be overridden by configuring the EndpointResolverFactory.
Declaration
IConnection CreateConnection(IList<AmqpTcpEndpoint> endpoints)
Parameters
Type | Name | Description |
---|---|---|
IList<AmqpTcpEndpoint> | endpoints | List of endpoints to use for the initial connection and recovery. |
Returns
Type | Description |
---|---|
IConnection | Open connection |
Exceptions
Type | Condition |
---|---|
BrokerUnreachableException | When no hostname was reachable. |
CreateConnection(IList<AmqpTcpEndpoint>, string)
Create a connection using a list of endpoints. The selection behaviour can be overridden by configuring the EndpointResolverFactory.
Declaration
IConnection CreateConnection(IList<AmqpTcpEndpoint> endpoints, string clientProvidedName)
Parameters
Type | Name | Description |
---|---|---|
IList<AmqpTcpEndpoint> | endpoints | List of endpoints to use for the initial connection and recovery. |
string | clientProvidedName | Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. |
Returns
Type | Description |
---|---|
IConnection | Open connection |
Exceptions
Type | Condition |
---|---|
BrokerUnreachableException | When no hostname was reachable. |
CreateConnection(IList<string>)
Connects to the first reachable hostname from the list.
Declaration
IConnection CreateConnection(IList<string> hostnames)
Parameters
Type | Name | Description |
---|---|---|
IList<string> | hostnames | List of host names to use |
Returns
Type | Description |
---|---|
IConnection | Open connection |
CreateConnection(IList<string>, string)
Connects to the first reachable hostname from the list.
Declaration
IConnection CreateConnection(IList<string> hostnames, string clientProvidedName)
Parameters
Type | Name | Description |
---|---|---|
IList<string> | hostnames | List of host names to use |
string | clientProvidedName | Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. |
Returns
Type | Description |
---|---|
IConnection | Open connection |
CreateConnection(string)
Create a connection to the specified endpoint.
Declaration
IConnection CreateConnection(string clientProvidedName)
Parameters
Type | Name | Description |
---|---|---|
string | clientProvidedName | Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. |
Returns
Type | Description |
---|---|
IConnection | Open connection |