Cosmos.EventDriven.Abstractions
0.0.5-RC.2
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
<PackageReference Include="Cosmos.EventDriven.Abstractions" Version="0.0.5-RC.2" />
<PackageVersion Include="Cosmos.EventDriven.Abstractions" Version="0.0.5-RC.2" />
<PackageReference Include="Cosmos.EventDriven.Abstractions" />
paket add Cosmos.EventDriven.Abstractions --version 0.0.5-RC.2
#r "nuget: Cosmos.EventDriven.Abstractions, 0.0.5-RC.2"
#:package Cosmos.EventDriven.Abstractions@0.0.5-RC.2
#addin nuget:?package=Cosmos.EventDriven.Abstractions&version=0.0.5-RC.2&prerelease
#tool nuget:?package=Cosmos.EventDriven.Abstractions&version=0.0.5-RC.2&prerelease
Cosmos.EventDriven.Abstractions
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
IPublicEventde forma asíncrona - IPrivateEventSender: Interfaz para publicar
IPrivateEventde 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:
- Cosmos.EventDriven.CritterStack — implementaciones base con Wolverine
- Cosmos.EventDriven.CritterStack.RabbitMQ — extensiones para RabbitMQ
- Cosmos.EventDriven.CritterStack.AzureServiceBus — extensiones para Azure Service Bus
Requisitos
- .NET 10.0 o superior
Licencia
Copyright © Cosmos. Todos los derechos reservados.
| 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
- 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 |