Interface IConnectionFactory
public interface IConnectionFactory
Properties
ClientProperties
Dictionary of client properties to be sent to the server.
IDictionary<string, object> ClientProperties { get; set; }
Property Value
ClientProvidedName
Default client provided name to be used for connections.
string ClientProvidedName { get; set; }
Property Value
ContinuationTimeout
Amount of time protocol operations (e.g.
queue.declare
) are allowed to take before
timing out.
TimeSpan ContinuationTimeout { get; set; }
Property Value
CredentialsProvider
Default CredentialsProvider implementation. If set, this overrides UserName / Password
ICredentialsProvider CredentialsProvider { get; set; }
Property Value
CredentialsRefresher
ICredentialsRefresher CredentialsRefresher { get; set; }
Property Value
HandshakeContinuationTimeout
Amount of time protocol handshake operations are allowed to take before timing out.
TimeSpan HandshakeContinuationTimeout { get; set; }
Property Value
Password
Password to use when authenticating to the server.
string Password { get; set; }
Property Value
RequestedChannelMax
Maximum channel number to ask for.
ushort RequestedChannelMax { get; set; }
Property Value
RequestedFrameMax
Frame-max parameter to ask for (in bytes).
uint RequestedFrameMax { get; set; }
Property Value
RequestedHeartbeat
Heartbeat setting to request.
TimeSpan RequestedHeartbeat { get; set; }
Property Value
Uri
Sets or gets the AMQP Uri to be used for connections.
Uri Uri { get; set; }
Property Value
UseBackgroundThreadsForIO
When set to true, background threads will be used for I/O and heartbeats.
bool UseBackgroundThreadsForIO { get; set; }
Property Value
UserName
Username to use when authenticating to the server.
string UserName { get; set; }
Property Value
VirtualHost
Virtual host to access during this connection.
string VirtualHost { get; set; }
Property Value
Methods
AuthMechanismFactory(IList<string>)
Given a list of mechanism names supported by the server, select a preferred mechanism, or null if we have none in common.
IAuthMechanismFactory AuthMechanismFactory(IList<string> mechanismNames)
Parameters
Returns
CreateConnection()
Create a connection to the specified endpoint.
IConnection CreateConnection()
Returns
CreateConnection(IList<AmqpTcpEndpoint>)
Create a connection using a list of endpoints. The selection behaviour can be overridden by configuring the EndpointResolverFactory.
IConnection CreateConnection(IList<AmqpTcpEndpoint> endpoints)
Parameters
endpoints
IList<AmqpTcpEndpoint>List of endpoints to use for the initial connection and recovery.
Returns
- IConnection
Open connection
Exceptions
- 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.
IConnection CreateConnection(IList<AmqpTcpEndpoint> endpoints, string clientProvidedName)
Parameters
endpoints
IList<AmqpTcpEndpoint>List of endpoints to use for the initial connection and recovery.
clientProvidedName
stringApplication-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
- IConnection
Open connection
Exceptions
- BrokerUnreachableException
When no hostname was reachable.
CreateConnection(IList<string>)
Connects to the first reachable hostname from the list.
IConnection CreateConnection(IList<string> hostnames)
Parameters
Returns
- IConnection
Open connection
CreateConnection(IList<string>, string)
Connects to the first reachable hostname from the list.
IConnection CreateConnection(IList<string> hostnames, string clientProvidedName)
Parameters
hostnames
IList<string>List of host names to use
clientProvidedName
stringApplication-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
- IConnection
Open connection
CreateConnection(string)
Create a connection to the specified endpoint.
IConnection CreateConnection(string clientProvidedName)
Parameters
clientProvidedName
stringApplication-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
- IConnection
Open connection