feat(batch3): implement send queue feature group

This commit is contained in:
Joseph Doherty
2026-02-28 07:31:12 -05:00
parent 6b67c83c0e
commit beab0e60da
7 changed files with 380 additions and 7 deletions

View File

@@ -334,6 +334,23 @@ public sealed partial class NatsServer
public ClientConnection CreateInternalAccountClient() =>
CreateInternalClient(ClientKind.Account);
/// <summary>
/// Creates and attaches a per-account send queue.
/// Mirrors Go <c>Server.newSendQ</c> call sites.
/// </summary>
internal SendQueue NewSendQueue(Account account)
{
ArgumentNullException.ThrowIfNull(account);
var existing = account.GetSendQueue();
if (existing is not null)
return existing;
var sendQueue = SendQueue.NewSendQ(this, account);
account.SetSendQueue(sendQueue);
return sendQueue;
}
/// <summary>
/// Creates an internal client of the given <paramref name="kind"/>.
/// Mirrors Go <c>Server.createInternalClient</c>.