Core Concepts
This section explains the fundamental building blocks of the Hermodr framework.
Overview
┌──────────────────────────────────────────────────────┐
│ Your application │
│ │
│ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ Event data │─────▶│ EventPublisher │ │
│ │ (annotated │ └──────────┬───────────────┘ │
│ │ classes) │ │ fan-out │
│ └──────────────┘ ┌────────┴────────┐ │
│ │ │ │
│ ┌───────▼─────┐ ┌───────▼──────┐ │
│ │ Channel A │ │ Channel B │ │
│ │ (Azure SB) │ │ (Webhook) │ │
│ └─────────────┘ └──────────────┘ │
└──────────────────────────────────────────────────────┘
- You describe an event using an annotated data class (or construct a raw
CloudEvent). - You call
EventPublisher.PublishAsync(orPublishEventAsync). - The publisher fans the event out to every registered
IEventPublishChannel. - Each channel serialises the event and dispatches it to the appropriate transport.
Key Abstractions
| Abstraction | Role |
|---|---|
EventPublisher | The single entry point for publishing events |
IEventMiddleware | A composable step in the publish pipeline (enrichment, validation, observability, …) |
EventContext | Carries the current event, scoped services, options, and a data-sharing Items bag through the pipeline |
IEventPublishChannel | One transport target (Azure Service Bus queue, RabbitMQ exchange, …) |
IBatchEventPublishChannel | A channel that also supports delivering multiple events in a single batched call |
IEventFactory | Converts an annotated data object into a CloudEvent |
IEventIdGenerator | Generates unique identifiers for events (default: GUID) |
IEventSystemTime | Supplies the event timestamp (replaceable for testing) |
Keyed IEventPublisher | Resolves a named publisher pipeline by name at runtime |