feat: add MaxPending, WriteDeadline options and error constants

This commit is contained in:
Joseph Doherty
2026-02-22 23:33:49 -05:00
parent 1a916a3f36
commit 61c6b832e5
3 changed files with 7 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ public sealed class NatsOptions
public int MaxPayload { get; set; } = 1024 * 1024;
public int MaxControlLine { get; set; } = 4096;
public int MaxConnections { get; set; } = 65536;
public long MaxPending { get; set; } = 64 * 1024 * 1024; // 64MB, matching Go MAX_PENDING_SIZE
public TimeSpan WriteDeadline { get; set; } = TimeSpan.FromSeconds(10);
public TimeSpan PingInterval { get; set; } = TimeSpan.FromMinutes(2);
public int MaxPingsOut { get; set; } = 2;