Skip to main content

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) │ │
│ └─────────────┘ └──────────────┘ │
└──────────────────────────────────────────────────────┘
  1. You describe an event using an annotated data class (or construct a raw CloudEvent).
  2. You call EventPublisher.PublishAsync (or PublishEventAsync).
  3. The publisher fans the event out to every registered IEventPublishChannel.
  4. Each channel serialises the event and dispatches it to the appropriate transport.

Key Abstractions

AbstractionRole
EventPublisherThe single entry point for publishing events
IEventMiddlewareA composable step in the publish pipeline (enrichment, validation, observability, …)
EventContextCarries the current event, scoped services, options, and a data-sharing Items bag through the pipeline
IEventPublishChannelOne transport target (Azure Service Bus queue, RabbitMQ exchange, …)
IBatchEventPublishChannelA channel that also supports delivering multiple events in a single batched call
IEventFactoryConverts an annotated data object into a CloudEvent
IEventIdGeneratorGenerates unique identifiers for events (default: GUID)
IEventSystemTimeSupplies the event timestamp (replaceable for testing)
Keyed IEventPublisherResolves a named publisher pipeline by name at runtime

Pages in this section