feat(notification-outbox): add dispatcher loop to NotificationOutboxActor

This commit is contained in:
Joseph Doherty
2026-05-19 01:42:28 -04:00
parent 4dc9f9e159
commit c41f43c87f
4 changed files with 489 additions and 7 deletions

View File

@@ -26,4 +26,30 @@ internal static class InternalMessages
IActorRef Sender,
bool Succeeded,
string? Error);
/// <summary>
/// Periodic tick that triggers a dispatch sweep. Started as a periodic timer in
/// <c>PreStart</c> at the configured <c>DispatchInterval</c>. A singleton instance is
/// reused so the timer carries no per-tick state.
/// </summary>
internal sealed class DispatchTick
{
/// <summary>The shared singleton tick instance scheduled by the dispatch timer.</summary>
internal static readonly DispatchTick Instance = new();
private DispatchTick() { }
}
/// <summary>
/// Completion signal for an asynchronous dispatch sweep, piped back to the actor so the
/// in-flight guard is cleared on the actor thread. Sent on both success and failure of
/// the sweep — the actor only needs to know the sweep has finished.
/// </summary>
internal sealed class DispatchComplete
{
/// <summary>The shared singleton completion instance.</summary>
internal static readonly DispatchComplete Instance = new();
private DispatchComplete() { }
}
}