Class AmqpConnectionFactory

Namespace: redb.Route.Amqp
Assembly: redb.Route.Amqp.dll

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

Object→AmqpConnectionFactory

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; }

KeepAlive

TCP keepalive. (default: false)

public bool KeepAlive { get; set; }

MaxFrameSize

Maximum frame size in bytes. (default: 256KB)

public int MaxFrameSize { get; set; }

MaxSessions

Maximum sessions per connection. (default: 8)

public ushort MaxSessions { get; set; }

NoDelay

TCP NoDelay (Nagle off). (default: true)

public bool NoDelay { get; set; }

Password

Password for SASL PLAIN authentication.

public string? Password { get; set; }

Port

AMQP port (default: 5672, or 5671 for AMQPS).

public int Port { 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; }

SendBufferSize

TCP send buffer size in bytes. 0 = OS default.

public int SendBufferSize { get; set; }

SendTimeout

TCP send timeout in milliseconds. 0 = infinite.

public int SendTimeout { get; set; }

Ssl

Enable SSL/TLS (amqps://). (default: false)

public bool Ssl { get; set; }

SslCertPassword

Password for client certificate.

public string? SslCertPassword { 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; }

User

Username for SASL PLAIN authentication.

public string? User { get; set; }

VirtualHost

Virtual host / AMQP hostname field (used by Azure Service Bus, multi-tenant brokers).

public string? VirtualHost { get; set; }

Methods

Build()

Builds a native configured from these settings.

public ConnectionFactory Build()

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()