From 7b12eebbd1bb1a1a8d0aa6927f947e7419d6077a Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 15 Jun 2026 15:16:44 -0400 Subject: [PATCH] docs: add MaxEventSubscribersPerSession to config shape example; assert its default Add MaxEventSubscribersPerSession (value 8) to the Sessions block of the Configuration Shape JSON example in GatewayConfiguration.md, matching the appsettings.json default the options table already documents. Assert both MaxEventSubscribersPerSession (8) and MaxPendingCommandsPerSession (128) defaults in GatewayOptionsTests.OptionsBinding_UsesDesignDefaults. --- docs/GatewayConfiguration.md | 3 ++- .../Configuration/GatewayOptionsTests.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/GatewayConfiguration.md b/docs/GatewayConfiguration.md index 338c7c1..6054d6f 100644 --- a/docs/GatewayConfiguration.md +++ b/docs/GatewayConfiguration.md @@ -37,7 +37,8 @@ paths, timeouts, queue sizes, enum values, or protocol values are invalid. "MaxPendingCommandsPerSession": 128, "DefaultLeaseSeconds": 1800, "LeaseSweepIntervalSeconds": 30, - "AllowMultipleEventSubscribers": false + "AllowMultipleEventSubscribers": false, + "MaxEventSubscribersPerSession": 8 }, "Events": { "QueueCapacity": 10000, diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Configuration/GatewayOptionsTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Configuration/GatewayOptionsTests.cs index fcb8174..1d164b8 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Configuration/GatewayOptionsTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Configuration/GatewayOptionsTests.cs @@ -31,9 +31,11 @@ public sealed class GatewayOptionsTests Assert.Equal(30, options.Sessions.DefaultCommandTimeoutSeconds); Assert.Equal(64, options.Sessions.MaxSessions); + Assert.Equal(128, options.Sessions.MaxPendingCommandsPerSession); Assert.Equal(1800, options.Sessions.DefaultLeaseSeconds); Assert.Equal(30, options.Sessions.LeaseSweepIntervalSeconds); Assert.False(options.Sessions.AllowMultipleEventSubscribers); + Assert.Equal(8, options.Sessions.MaxEventSubscribersPerSession); Assert.Equal(10_000, options.Events.QueueCapacity); Assert.Equal(EventBackpressurePolicy.FailFast, options.Events.BackpressurePolicy);