Cosmos.EventDriven.Abstractions 0.0.5-RC.2

This is a prerelease version of Cosmos.EventDriven.Abstractions.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Cosmos.EventDriven.Abstractions --version 0.0.5-RC.2
                    
NuGet\Install-Package Cosmos.EventDriven.Abstractions -Version 0.0.5-RC.2
                    
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="Cosmos.EventDriven.Abstractions" Version="0.0.5-RC.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cosmos.EventDriven.Abstractions" Version="0.0.5-RC.2" />
                    
Directory.Packages.props
<PackageReference Include="Cosmos.EventDriven.Abstractions" />
                    
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 Cosmos.EventDriven.Abstractions --version 0.0.5-RC.2
                    
#r "nuget: Cosmos.EventDriven.Abstractions, 0.0.5-RC.2"
                    
#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 Cosmos.EventDriven.Abstractions@0.0.5-RC.2
                    
#: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=Cosmos.EventDriven.Abstractions&version=0.0.5-RC.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cosmos.EventDriven.Abstractions&version=0.0.5-RC.2&prerelease
                    
Install as a Cake Tool

Cosmos.EventDriven.Abstractions

NuGet

Abstracciones fundamentales para implementar Event Driven Architecture (EDA) en .NET 10.

Descripción

Este paquete proporciona las interfaces base necesarias para construir aplicaciones basadas en arquitecturas orientadas a eventos. Define contratos claros para la publicación de eventos públicos (inter-servicio) y eventos privados (intra-servicio).

Características

  • IPublicEvent: Marcador para eventos publicados a servicios externos vía broker (RabbitMQ, Azure Service Bus, etc.)
  • IPrivateEvent: Marcador para eventos publicados dentro del mismo bounded context
  • IPublicEventSender: Interfaz para publicar IPublicEvent de forma asíncrona
  • IPrivateEventSender: Interfaz para publicar IPrivateEvent de forma asíncrona
  • Sin dependencias de implementación concreta

Instalación

dotnet add package Cosmos.EventDriven.Abstractions

Uso

Definir un Evento Público (inter-servicio)

using Cosmos.EventDriven.Abstractions;

public record UserRegistered(
    string UserId,
    string Email,
    DateTime RegisteredAt
) : IPublicEvent;

Definir un Evento Privado (intra-servicio)

using Cosmos.EventDriven.Abstractions;

public record UserProfileUpdated(
    string UserId,
    string NewEmail
) : IPrivateEvent;

Publicar un Evento Público

public class UserService
{
    private readonly IPublicEventSender _publicEventSender;

    public UserService(IPublicEventSender publicEventSender)
    {
        _publicEventSender = publicEventSender;
    }

    public async Task RegisterUser(string userId, string email)
    {
        // Lógica de negocio...

        var @event = new UserRegistered(userId, email, DateTime.UtcNow);
        await _publicEventSender.PublishEventAsync(@event);
    }
}

Publicar Eventos Privados

public class UserService
{
    private readonly IPrivateEventSender _privateEventSender;

    public UserService(IPrivateEventSender privateEventSender)
    {
        _privateEventSender = privateEventSender;
    }

    public async Task UpdateProfile(string userId, string newEmail)
    {
        // Lógica de negocio...

        var @event = new UserProfileUpdated(userId, newEmail);
        await _privateEventSender.PublishAsync(@event);
    }
}

Distinción IPublicEvent vs IPrivateEvent

IPublicEvent IPrivateEvent
Alcance Inter-servicio Intra-servicio (mismo bounded context)
Broker RabbitMQ, Azure Service Bus Bus local de Wolverine
Uso típico Notificar a otros microservicios Desacoplar lógica dentro del mismo servicio

Implementaciones Concretas

Para implementaciones listas para usar con Wolverine, consulta:

Requisitos

  • .NET 10.0 o superior

Licencia

Copyright © Cosmos. Todos los derechos reservados.

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.
  • net10.0

    • No dependencies.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on Cosmos.EventDriven.Abstractions:

Package Downloads
Cosmos.EventSourcing.Abstractions

Abstracciones de EventSourcing para Cosmos

Entradas.Contratos

Package Description

Cosmos.EventDriven.CritterStack

Implementaciones de Wolverine para IPublicEventSender e IPrivateEventSender en Cosmos EDA

ObligacionesPorPagar.Radicacion.Contratos

Package Description

Cosmos.EventDriven.CritterStack.AzureServiceBus

Integración de Azure Service Bus con Wolverine para Cosmos EDA

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.7 73 3/12/2026
0.0.6 43 3/12/2026
0.0.5 37 3/12/2026
0.0.5-RC.2 59 3/11/2026
0.0.5-RC.1 69 3/10/2026
0.0.4 1,377 12/3/2025
0.0.3 224 11/25/2025
0.0.1 418 9/19/2025