Class AmqpConnectionFactory
AMQP 1.0 connection factory configuration. Standalone POCO — register in DI or reference by name.
Covers all settings:
SASL, SSL/TLS, TCP tuning, AMQP protocol limits, and reconnect policy.
public sealed class AmqpConnectionFactory
Inheritance
Properties
CheckCertRevocation
Check certificate revocation. (default: false)
public bool CheckCertRevocation { get; set; }
ClientName
Client name for logging/diagnostics (maps to ContainerId if not set).
public string? ClientName { get; set; }
ContainerId
Container ID sent during AMQP Open. Identifies this client to the broker.
public string? ContainerId { get; set; }
Host
Broker host (default: localhost). In a comma-separated list the connection opens to the first host; the others
public string Host { get; set; }
IdleTimeout
Idle timeout in milliseconds. 0 = disabled. (default: 120000)
public int IdleTimeout { get; set; }
ReceiveBufferSize
TCP receive buffer size in bytes. 0 = OS default.
public int ReceiveBufferSize { get; set; }
ReceiveTimeout
TCP receive timeout in milliseconds. 0 = infinite.
public int ReceiveTimeout { get; set; }
SaslMechanism
SASL mechanism: PLAIN, EXTERNAL, ANONYMOUS. (default: PLAIN if User is set, ANONYMOUS otherwise)
public SaslMechanism SaslMechanism { get; set; }
SslCertPath
Path to client certificate file (PFX/PEM) for mTLS.
public string? SslCertPath { get; set; }
SslProtocols
SSL protocols to use. (default: None — OS negotiates)
public SslProtocols SslProtocols { get; set; }
TrustAllCertificates
Skip server certificate validation (DANGEROUS — dev only). (default: false)
public bool TrustAllCertificates { get; set; }
VirtualHost
Virtual host / AMQP hostname field (used by Azure Service Bus, multi-tenant brokers).
public string? VirtualHost { get; set; }
Methods
BuildAddress()
Builds an from the current host/port/user/password settings.
public Address BuildAddress()
GetAddresses()
Parses comma-separated hosts and returns one address per host, in list order. The component connects to the
public Address[] GetAddresses()