Anarchy.Toolkit.Core.Events
1.0.6
See the version list below for details.
dotnet add package Anarchy.Toolkit.Core.Events --version 1.0.6
NuGet\Install-Package Anarchy.Toolkit.Core.Events -Version 1.0.6
<PackageReference Include="Anarchy.Toolkit.Core.Events" Version="1.0.6" />
<PackageVersion Include="Anarchy.Toolkit.Core.Events" Version="1.0.6" />
<PackageReference Include="Anarchy.Toolkit.Core.Events" />
paket add Anarchy.Toolkit.Core.Events --version 1.0.6
#r "nuget: Anarchy.Toolkit.Core.Events, 1.0.6"
#:package Anarchy.Toolkit.Core.Events@1.0.6
#addin nuget:?package=Anarchy.Toolkit.Core.Events&version=1.0.6
#tool nuget:?package=Anarchy.Toolkit.Core.Events&version=1.0.6
Anarchy.Toolkit.Core.Events
In-process publish/subscribe and building blocks for a generic domain-event pipeline.
dotnet add package Anarchy.Toolkit.Core.Events
- Implement
ILocalEventandILocalEventHandler<T>and register the local bus withservices.AddLocalEventBus(). - Build domain-event processing around
EventEnvelopeBase,Event,PersistedEvent, the processor, handler bus andEventEnvelopeParser. - The local bus is in-process; use a message-broker implementation for external delivery.
When to use it
Use the local bus to notify other components within the same process, or use the domain-event types to build an event processing pipeline. The local bus is not a durable queue: events are lost if the process stops, and it does not deliver across service instances.
How to use it
Register an Observer and the bus, then register each handler explicitly. For example, with an application-defined OrderPlaced : ILocalEvent and OrderPlacedHandler : ILocalEventHandler<OrderPlaced>:
using Anarchy.Toolkit.Core.Events.Extension.Microsoft.DependencyInjection;
using Anarchy.Toolkit.Core.Events.Service.Event.InMemory;
using Microsoft.Extensions.DependencyInjection;
services.AddLocalEventBus();
services.AddScoped<ILocalEventHandler<TransactionRolledback>, TransactionRolledbackHandler>();
// In a service that receives ILocalEventBus via DI:
await bus.PublishAsync(new TransactionRolledback(), absorbErrors: false, ct: cancellationToken);
Each publish resolves handlers in a new DI scope and awaits them sequentially. Handler exceptions are logged and absorbed by default; set absorbErrors: false to propagate the first failure. No registered handlers is a no-op. For external delivery, compose this package with a broker adapter instead.
See the toolkit overview and architecture guide.
Releases
1.0.6
- docs: expand XML docblocks across all projects for the DocFX API reference
1.0.5
- refactor(src): clean up code style across library packages
1.0.3
- build: migrate local automation to build tooling
1.0.2
- docs: expand package guides and release histories
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced domain event envelopes, handlers and processing, the local event bus and message broker envelope parsing.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Anarchy.Toolkit.Core (>= 1.0.6)
- Anarchy.Toolkit.Core.Messaging.Abstractions (>= 1.0.6)
- Anarchy.Toolkit.Core.Observability (>= 1.0.6)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.4.0)
- Serilog.Sinks.Console (>= 6.1.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Anarchy.Toolkit.Core.Events:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Infrastructure.Persistence.Db
Provider-agnostic relational database implementation of the persistence abstraction: connection pool, Unit of Work, resilience policy, dialect contract, repository bases, service health reports, and the transactional outbox / event store (repository contracts, records, type-id cache, and repository bases; providers supply the dialect and the embedded SQL). |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.