feat(batch3): implement send queue feature group
This commit is contained in:
@@ -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>.
|
||||
|
||||
Reference in New Issue
Block a user