EventHub
A strongly-typed, serverless event bus on AWS SNS + SQS fan-out — publish and subscribe to typed distributed events without hand-writing topic and queue wiring.
Event-driven without the yak-shaving.
Typed events
Each event is a C# class marked [HubEvent], with a topic, version and description. Every publish carries its topic and an event id.
[HubEvent(Topic = "…")] SNS + SQS fan-out
Each event gets its own SNS topic, created at startup. Subscribe as many SQS queues as you need, so every consumer drains its own.
SubscribeQueueToTopic Typed handlers
Implement IEventHubRequestHandler<T> and register it. HTTPS deliveries are checked against the SNS signature before your handler runs.
AddEventHubHandler<H, T>() Scheduled events
Mark an event [SchedulableEvent] and it gets generated schedule, reschedule and unschedule methods: one-off, cron or rate, on EventBridge Scheduler.
[SchedulableEvent] Batches & FIFO
Publish up to ten events in one call, and make a topic FIFO, with deduplication, when order matters.
PublishBatchAsync() A log of every publish
Each event is logged before it’s sent and kept for two years by default. Insights reads the same log.
GetPublishedEventLogsAsync Inside your service.
On Lambda or in any container.
EventHub 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.
- ✓ On Lambda: an SQS trigger hands each batch to your consumers, and only failed records retry
- ✓ In a container: set
WatchQueueand the same consumers long-poll their queue - ✓ Over HTTPS:
UseServerlessEventHubRoutes()takes SNS deliveries, signature-checked
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.