Class RedisConnectionFactory
Connection factory for Redis. Register via DI or in the route registry
and reference by name in endpoint URIs (connectionFactory=myFactory).
public sealed class RedisConnectionFactory
Inheritance
Properties
AbortOnConnectFail
Abort on connection fail (default: false — allows reconnect).
public bool AbortOnConnectFail { get; set; }
AsyncTimeout
Async operation timeout in milliseconds (default: 5000).
public int AsyncTimeout { get; set; }
CheckCertificateRevocation
Enable certificate revocation checking (default: true).
public bool CheckCertificateRevocation { get; set; }
ConnectionString
Redis connection string (e.g., "localhost:6379" or "host1:6379,host2:6379").
public string ConnectionString { get; set; }
ConnectTimeout
Connection timeout in milliseconds (default: 5000).
public int ConnectTimeout { get; set; }
IncludeDetailInExceptions
Include detailed diagnostics in exceptions.
public bool IncludeDetailInExceptions { get; set; }
IncludePerformanceCountersInExceptions
Include performance counters in exceptions.
public bool IncludePerformanceCountersInExceptions { get; set; }
ReconnectRetryPolicy
Reconnect retry policy: "exponential" or "linear" (default: exponential).
public string ReconnectRetryPolicy { get; set; }
ServiceName
Redis Sentinel service name. Required for Sentinel-based HA setups.
public string? ServiceName { get; set; }
SslProtocols
SSL/TLS protocol versions (e.g. "Tls12", "Tls13"). Default = system default.
public string? SslProtocols { get; set; }
SyncTimeout
Synchronous operation timeout in milliseconds (default: 5000).
public int SyncTimeout { get; set; }
TieBreaker
Tie-breaker key for master detection in multi-master scenarios.
public string? TieBreaker { get; set; }
User
Redis ACL username (Redis 6+). Use together with Password for ACL authentication.
public string? User { get; set; }