Class AlertDispatcher

Assembly: redb.Tsak.Core.dll

Fans watchdog / lifecycle alerts out to every enabled .

Fire-and-forget: alerts go through a bounded in-memory queue drained by a background
pump, so the watchdog scan never blocks on a slow SMTP server, and a broken alert backend can
never take the node down. Queue overflow drops the oldest (with a warning).


Dedup: the same incident () is delivered at most
once per — the watchdog rebuilds its alert
snapshot every scan, so without this a hung exchange would re-page on every cycle.

public sealed class AlertDispatcher : IAsyncDisposable

Inheritance

Object→AlertDispatcher

Implements

Properties

EnabledChannels

Names of the enabled channels (for status display).

public IReadOnlyList<string> EnabledChannels { get; }

IsActive

True when alerts are on and at least one channel is enabled.

public bool IsActive { get; }

Methods

AttachEndpointChannel(IRouteContext)

Attaches the generic broker endpoint channel once the _system route context is available.

public void AttachEndpointChannel(IRouteContext context)

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or

public ValueTask DisposeAsync()

Enqueue(AlertNotification)

Enqueues an alert for delivery, applying the min-level filter and dedup window. Never blocks.

public void Enqueue(AlertNotification alert)

TestAsync(AlertNotification, CancellationToken)

Delivers an alert to every enabled channel synchronously, bypassing the queue and the

public Task<IReadOnlyList<AlertChannelResult>> TestAsync(AlertNotification alert, CancellationToken ct)

Constructors