feat(lmxproxy): add delivered/dropped message counts to subscription stats
Subscription metrics (totalDelivered, totalDropped) now visible in /api/status JSON and HTML dashboard. Card turns yellow if drops > 0. Aggregated from per-client counters in SubscriptionManager. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -242,10 +242,20 @@ namespace ZB.MOM.WW.LmxProxy.Host.Subscriptions
|
||||
/// <summary>Returns subscription statistics.</summary>
|
||||
public SubscriptionStats GetStats()
|
||||
{
|
||||
long totalDelivered = 0;
|
||||
long totalDropped = 0;
|
||||
foreach (var kvp in _clientSubscriptions)
|
||||
{
|
||||
totalDelivered += kvp.Value.DeliveredCount;
|
||||
totalDropped += kvp.Value.DroppedCount;
|
||||
}
|
||||
|
||||
return new SubscriptionStats(
|
||||
_clientSubscriptions.Count,
|
||||
_tagSubscriptions.Count,
|
||||
_clientSubscriptions.Values.Sum(c => c.Addresses.Count));
|
||||
_clientSubscriptions.Values.Sum(c => c.Addresses.Count),
|
||||
totalDelivered,
|
||||
totalDropped);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user