Deveel Events is a lightweight, extensible framework for publishing domain events in .NET applications, built on top of the CloudEvents standard.
The ambition of this framework is to implement a set of common patterns and practices for a simple and efficient event-driven architecture in .NET, without reinventing the wheel every time a team needs to broadcast domain events.
It is not in the scope of this project to provide a full-featured event storage system or a complex pub/sub platform. If you need those capabilities, consider pairing this library with a dedicated message broker — Deveel Events already ships channel adapters for the most popular ones.
Domain-Driven Design (DDD) treats domain events as first-class citizens of the model — facts about something that happened inside the domain, named in the ubiquitous language of domain experts (OrderPlaced, InvoiceIssued, UserRegistered).
Key properties of domain events:
- Immutable facts — they describe what happened, not what should happen.
- Decoupled producers and consumers — the producing bounded context does not need to know who is listening.
- Cross-context integration — events are the preferred way to share information across bounded contexts without tight coupling.
- Temporal decoupling — consumers can process events asynchronously, at their own pace.
Deveel Events implements the publishing side of this pattern: a transport-agnostic layer that broadcasts domain events from a bounded context to any number of downstream consumers, without prescribing how you model aggregates or build read models.
Publishing an event is only half the story. Consumers need to know the shape of each event — its properties, types, and constraints — to deserialise it correctly and build reliable integrations. Without a formal contract, field renames silently break consumers and integration knowledge lives only in tribal memory.
Event schemas fill the same role for asynchronous messaging that OpenAPI/Swagger fills for REST APIs. The Deveel.Events.Schema package can derive a schema automatically from annotated data classes and export it as:
- JSON Schema — for schema-registry integration and tooling.
- YAML — for human-readable, version-controlled contract documents.
- AsyncAPI 2.x — a complete, machine-readable async API specification. AsyncAPI tooling can generate documentation sites, client SDKs, and mock servers from it.
Treat schemas as public API contracts: version them, prefer additive changes, and communicate breaking changes in advance.
Applications frequently need to notify other parts of the system about domain events. Teams end up rewriting the same boilerplate — serialising payloads, constructing envelopes, wiring up transport clients — over and over again.
Deveel Events provides a single, consistent way to publish events across any transport, so teams can focus on domain logic instead of infrastructure plumbing.
All events are modelled as CloudEvent objects, ensuring maximum interoperability with cloud platforms and services that implement the CNCF CloudEvents specification.
All packages in this solution multi-target the following runtimes:
| Runtime | Version |
|---|---|
| .NET | 8, 9, 10 |
Note:
Deveel.Events.Schema.AsyncApialso requires the ASP.NET Core shared framework (Microsoft.AspNetCore.App), since it integrates with the Saunter AsyncAPI middleware.
Every package requires the Microsoft Dependency Injection infrastructure (Microsoft.Extensions.DependencyInjection). Below are the additional per-package dependencies automatically pulled in as transitive NuGet references:
| Package | Key Dependencies |
|---|---|
Deveel.Events.Annotations |
(none — pure attribute library) |
Deveel.Events.Publisher |
CloudNative.CloudEvents · Microsoft.Extensions.Options · Microsoft.Extensions.Logging.Abstractions |
Deveel.Events.Publisher.AzureServiceBus |
Azure.Messaging.ServiceBus ≥ 7.20 |
Deveel.Events.Publisher.RabbitMq |
RabbitMQ.Client ≥ 7.2 · Deveel.Events.Amqp.Annotations |
Deveel.Events.Publisher.MassTransit |
MassTransit ≥ 9.1 |
Deveel.Events.Publisher.Webhook |
Microsoft.Extensions.Http · Polly ≥ 7.2 |
Deveel.Events.Subscriptions |
Deveel.Events.Publisher · Microsoft.Extensions.Logging.Abstractions |
Deveel.Events.Schema |
CloudNative.CloudEvents |
Deveel.Events.Schema.Yaml |
YamlDotNet ≥ 16.3 |
Deveel.Events.Schema.AsyncApi |
Saunter ≥ 0.13 · YamlDotNet ≥ 16.3 · ASP.NET Core shared framework |
| Package | Description | NuGet (Stable) | Pre-release | Downloads |
|---|---|---|---|---|
Deveel.Events.Subscriptions |
Event dispatcher and subscription management with pluggable resolvers |
Full documentation — installation, quick-start, concept guides, channel references, schema export, and testing — is available in the docs/ folder of this repository.
| Section | Description |
|---|---|
| Getting Started | Installation and quick-start guide |
| Core Concepts | Publisher, channels, and event annotations |
| Publisher Channels | Azure Service Bus, RabbitMQ, MassTransit, Webhook |
| Event Subscriptions | Event dispatcher, filters, routing, and custom resolvers |
| Event Schema | Schema definition, export (JSON / YAML / AsyncAPI), and validation |
| Testing | Unit-testing event publishing |
The framework is still evolving. See the ROADMAP for the full list of planned features and the version milestone in which each is expected to ship.
- Event Subscription & Routing (v1.1) — subscribe to event types with attribute-based filtering
- Event Middleware Pipeline (v1.1) — composable cross-cutting hooks (logging, validation, tracing)
- Dead-Letter Handling & Replay (v1.2) — capture and resubmit failed events
- Outbox Pattern (v1.2) — guaranteed exactly-once publishing via a transactional outbox
- Event Scheduler (v1.2) — defer event publishing to a future time or after a delay
- OpenTelemetry Integration (v1.3) — end-to-end distributed tracing across service boundaries
- Event Store & Audit Log (v1.3) — append-only persistence of domain events for auditing and read-model rebuilding
- Publish Delivery Log (v1.3) — per-attempt operational record of every publish (channel, outcome, error code, latency, retry count) across pluggable storage backends (SQL, file, in-memory)
- Schema Validation at Publish Time (v1.3) — validate events against their registered schema before dispatch
- Event Versioning & Compatibility (v1.4) — breaking-change detection and upcasting
- AsyncAPI / Schema Export Improvements (v1.4) — assembly scanning, CLI tooling, OpenAPI 3.1 webhooks
- HTTP & gRPC Channels (v1.5) — direct service-to-service delivery without a broker
- Webhook Consumer for ASP.NET Core (v2.0) — receive inbound CloudEvents over HTTP with signature verification and automatic routing
- RabbitMQ Consumer (v2.0) — consume CloudEvents from RabbitMQ queues and route them through the subscription registry
- Azure Service Bus Consumer (v2.0) — consume CloudEvents from Service Bus queues and topic subscriptions
- MassTransit Consumer Bridge (v2.0) — expose Deveel Events subscriptions as MassTransit consumers
- Expanded Testing Utilities (v2.1) — fluent publish assertions, in-memory event bus, and consumer-side test helpers
Monitor the open issues to see what is being actively worked on.
Thanks go to all the people who have contributed to this project!
We welcome bug reports, feature requests, and pull requests. Please read the Contributing Guidelines before submitting.
Released under the MIT License.