YAMCqrs.EventBus.Core 10.0.1

dotnet add package YAMCqrs.EventBus.Core --version 10.0.1
                    
NuGet\Install-Package YAMCqrs.EventBus.Core -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YAMCqrs.EventBus.Core" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YAMCqrs.EventBus.Core" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="YAMCqrs.EventBus.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YAMCqrs.EventBus.Core --version 10.0.1
                    
#r "nuget: YAMCqrs.EventBus.Core, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YAMCqrs.EventBus.Core@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YAMCqrs.EventBus.Core&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=YAMCqrs.EventBus.Core&version=10.0.1
                    
Install as a Cake Tool

YAMCqrs.EventBus.Core

Documentacion en español

Core event management library for the YAMCqrs ecosystem.

The package is completely messaging-provider agnostic and provides a decoupled infrastructure for event publishing, persistence, processing, and subscription.

It also includes an InMemory implementation that enables local Domain Event simulation and allows evolving those events into real Integration Events following ADR 6 guidelines.


⚙️ Installation

dotnet add package YAMCqrs.EventBus.Core

🚀 Quick Start

builder.Services.AddEventBus(opt =>
{
    opt.SubscribeConfiguration.ConcurrentWorkers = 1;
    opt.PublishConfiguration.ConcurrentWorkers = 1;
});

⚙️ Configuration

PublishConfiguration and SubscribeConfiguration contain the same properties. PublishConfiguration defines the configuration for outgoing messages, while SubscribeConfiguration defines the configuration for incoming messages, allowing different settings to be applied independently for each flow.

  • ConcurrentWorkers Number of concurrent workers for parallel processing.

  • BatchSize Maximum number of events processed per execution.

  • PollingIntervalSeconds Polling interval used to fetch pending events.

  • ErrorThresholdPercentage Maximum allowed error percentage before marking a batch as failed.


🛠️ Core Components

IEventBusPublisher

Allows extending event publishing to:

  • Kafka
  • RabbitMQ
  • Azure Service Bus
  • AWS SQS/SNS
  • Custom providers

The library includes an InMemory implementation for local Domain Events.


IEventPublisher

Registers the intent to publish events while respecting the current transactional scope.

Benefits:

  • prevents inconsistent persistence
  • decouples business logic
  • supports asynchronous processing

IPublishEventStore

Responsible for storing pending events before publishing.

Includes:

  • auditing
  • tracking
  • retries
  • processing decoupling

⚠️ The InMemory implementation is not recommended for production.


ISubscribeEventStore

Stores received events before processing.

Enables:

  • reprocessing
  • auditing
  • decoupling reception and consumption

📡 Domain Events with InMemory

Outgoing event

internal sealed class DomainEventPublishEvent : InMemoryPublishEvent
{
    public const string TopicName = "domain-event-topic";

    public int Numerito { get; init; }

    public override string Topic()
    {
        return TopicName;
    }
}

Publish the event

await eventPublisher.PublishAsync(
    new DomainEventPublishEvent(),
    cancellationToken);

Incoming event

internal sealed class DomainEventSubscribeEvent()
    : InMemorySuscribeEvent(DomainEventPublishEvent.TopicName)
{
    public int Numerito { get; init; }
}

Process the event

internal sealed class DomainEventSubscribeHanlder
    : ICommandHandler<DomainEventSubscribeEvent, bool>
{
    public Task<Result<bool>> HandleAsync(
        DomainEventSubscribeEvent command,
        CancellationToken cancellationToken = default)
    {
        return Task.FromResult(Result<bool>.Success(true));
    }
}

⚡ Architectural Features

  • Event-driven architecture
  • Domain Events
  • Integration Events
  • Outbox-like processing
  • Asynchronous processing
  • Low coupling
  • Extensible infrastructure
  • Event auditing
  • Retry support

📋 Dependencies

  • YAMCqrs.EventBus.Core
  • YAMCqrs.BackgroundWorker
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on YAMCqrs.EventBus.Core:

Package Downloads
YAMCqrs.EventBus.Provider.Kafka

Package Description

YAMCqrs.EventBus.Storage.MongoDb

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 45 5/18/2026
10.0.0 90 5/17/2026