NotificationHub
Fire notifications on any event — instantly, after a delay, on a recurring schedule, or with smart cancellations if a different event happens first. One template holds a version for each channel, from email and SMS to push and in-app, and each one switches on or off.
Schedule it. Wait. Cancel if needed.
Four ways to decide when a notification fires, all built into the same template you author once. Pick a mode, configure it, and the hub handles the rest: the queues, the timing and the cancellation.
Event-triggered
Send as soon as the event is ingested. No glue code.
Delayed
Wait a defined duration after the trigger event, then send. One-shot.
Delayed + Cancellable
Same delay, but cancel the send if a different event fires first. Perfect for nudges that shouldn't race the user.
Recurring
Send on an interval — daily digests, weekly summaries, anniversary reminders.
Author once. Switch each channel on or off.
Your providers. Our engine.
NotificationHub ships no delivery provider: every channel sends through one you write. Implement IHubDispatchProvider over the SES, Twilio or FCM account you already use and register it with RegisterDispatchProvider. Templates, scheduling, smart cancellations and priority queues stay in the hub. The wire stays yours.
IHubDispatchProvider you write and register with RegisterDispatchProvider<T>(). // The SDK ships no delivery provider. Write one for each account// you send through by implementing the dispatch interface…public sealed class SendGridDispatchProvider : IHubDispatchProvider{ public Task DispatchNotificationAsync(DispatchMessage message) { // hand the rendered message to your provider's SDK return Task.CompletedTask; } public Task DispatchBatchNotificationAsync(List<DispatchMessage> batch) => Task.WhenAll(batch.Select(DispatchNotificationAsync));}// …then register it under a key.builder.Services .RegisterDispatchProvider<SendGridDispatchProvider>("sendgrid");// The hub still owns templates, scheduling, smart cancellations// and the priority queues. Send the right thing. At exactly the right moment.
Two send modes
Send a pre-rendered message, or publish an event and let the hub pick the template. An event missing one of its topic’s parameters is refused.
IngestEventNotificationAsync Seven channels
SMS, email, web, push, in-app, WhatsApp and webhook. One template holds a version per channel, with {first_name} placeholders.
PublishChannel.WhatsApp Scheduling
Delay a send, repeat it, or put it on a cron calendar, in a time zone, with an end date or a maximum count.
NotificationScheduleType Smart cancellations
A scheduled send is cancelled when a matching event arrives first, matched on its topic and a correlation id read from the payload.
ScheduleCancellationEventDto Dispatch priority
Transactional sends go to a high-priority outbox queue and bulk to a low one, so urgent messages never wait behind a campaign.
NotificationDispatchPriority Bring your own delivery
The hub queues every send and routes it by channel to the dispatcher you register, on the email, SMS or push accounts you already use.
RegisterDispatchProvider<T> Inside your service.
On Lambda or in any container.
NotificationHub is a .NET library, not a service you call. Add the package, register it in Program.cs, and it runs inside your own service, in process. Ship that service as a Lambda function or as your own container on ECS, EKS or App Runner — the module goes wherever your code goes.
- ✓ In process: your code calls the module directly — no sidecar, no extra network hop
- ✓ Built from your code: your image or Lambda package, patched on your schedule
- ✓ Configured in
Program.cs, with values from your own settings
Kanject.Program.cs, and exposes a typed API the rest of your service can use immediately.
Simplify your cloud
journey today.
Join forward-thinking developers and businesses who trust Kanject to eliminate cloud complexity and accelerate innovation.