Deveel Events is a lightweight, extensible framework for building event-driven .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 — from publishing domain events to consuming them, managing subscriptions, and validating event schemas — without reinventing the wheel every time a team needs to integrate across bounded contexts.
The current release focuses on the publishing side: a transport-agnostic layer that broadcasts domain events from a bounded context to any number of downstream consumers. Upcoming releases will introduce consumer adapters, persistent subscription registries, and additional transport channels. See the roadmap for the full plan.
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.Amqp.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.Resilience ≥ 9.6 |
Deveel.Events.Subscriptions |
Deveel.Events.Publisher · Deveel.Filters · 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) | GitHub (Unstable) | Downloads |
|---|---|---|---|---|
Deveel.Events.Subscriptions |
Event dispatcher and subscription management with pluggable resolvers |
The full documentation is published at events.deveel.org — including installation guides, concept references, channel adapters, schema export, and testing utilities.
The source of the documentation is also available in the docs/ folder of this repository (published via GitBook).
| 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 description of every planned feature and the version milestone in which each is expected to ship.
- Event Subscription & Routing — subscribe to event types with attribute-based filtering and in-process routing
- Event Middleware Pipeline — composable cross-cutting hooks (logging, validation, correlation, tracing)
- Event Replay & Dead-Letter Handling — capture and resubmit failed events with configurable retry and back-off
- Outbox Pattern Integration — guaranteed exactly-once publishing via a transactional outbox channel
- Event Scheduler & Deferred Publishing — defer event publishing to a future point in time or after a delay
- OpenTelemetry & Distributed Tracing Integration — propagate W3C trace context as CloudEvents extensions for end-to-end traces
- Event Store & Audit Log Channel — append-only persistence of every domain event for auditing and read-model rebuilding
- Schema Validation at Publish Time — validate event payloads against their registered schema before channel dispatch
- Publish Delivery Log — per-attempt operational record (channel, outcome, error code, latency, retry count) across pluggable storage backends
- Event Versioning & Compatibility — breaking-change detection, upcasting pipeline, and version-aware routing
- AsyncAPI & Schema Export Improvements — assembly scanning, dotnet CLI tool, OpenAPI 3.1 webhook export
- CloudEvents HTTP Binding for the Webhook Publisher — bring the existing Webhook publisher into full structured/binary content-mode compliance
- HTTP Publisher Channel — lightweight, sign-free point-to-point delivery to statically-configured endpoints
- gRPC Publisher Channel — low-latency service-to-service delivery using the CloudEvents gRPC protocol binding
- Apache Kafka Publisher Channel — publish CloudEvents to Kafka topics with partition key control and Schema Registry support
- Amazon SQS Publisher Channel — standard and FIFO queue delivery on AWS with batch publish and S3 offload
- Amazon SNS Publisher Channel — fan-out to SQS queues, Lambda functions, and HTTP endpoints via SNS topics
- Google Cloud Pub/Sub Publisher Channel — ordered delivery to GCP Pub/Sub topics with Workload Identity support
- NATS / JetStream Publisher Channel — ultra-low-latency delivery to NATS subjects or durable JetStream streams
- Webhook Consumer for ASP.NET Core — receive inbound CloudEvents over HTTP with HMAC signature verification and automatic routing
- RabbitMQ Consumer — consume CloudEvents from RabbitMQ queues and route them through the subscription registry
- Azure Service Bus Consumer — consume CloudEvents from Service Bus queues and topic subscriptions
- MassTransit Consumer Bridge — expose Deveel Events subscriptions as MassTransit consumers and vice versa
- Expanded Testing Utilities — fluent publish assertions (
AssertPublished,AssertNotPublished), in-memory event bus, and consumer-side test helpers
- Subscription Management Framework — provider-agnostic
ISubscriptionStoreabstraction with in-memory default and runtime lifecycle operations - Relational Registry Provider (Entity Framework Core) — persist subscriptions in SQL Server, PostgreSQL, or SQLite with bundled migrations
- Document Registry Provider (MongoDB) — persist subscriptions as MongoDB documents with real-time change-stream synchronisation
- Subscription Management REST API — secured minimal-API endpoint group with OpenAPI metadata and change-notification webhooks
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.