EricksonLopez.Messaging
dotnet-messaging · Mensajería y Eventos
En esta página (20 secciones)
1. Identidad, Nivel y Perfil de Madurez#
2. Propuesta de Valor y Problema que Resuelve#
High-performance, zero-allocation, Native AOT-first distributed messaging and pub/sub framework for .NET 10 microservices and cloud brokers.
Los buses de mensajes con reflexión escanean ensamblados al inicio, lanzan excepciones en rechazos de negocio y filtran detalles del broker en los contratos.
3. Instalación Rápida#
Paquete principal: EricksonLopez.Messaging
dotnet add package EricksonLopez.Messaging --version 2.0.0<PackageReference Include="EricksonLopez.Messaging" Version="2.0.0" /><PackageVersion Include="EricksonLopez.Messaging" Version="2.0.0" />4. Métricas Verificadas del Ecosistema#
Instantánea recuperada UTC: 2026-12-01
5. Cuándo Usar y Cuándo NO Usar#
Cuándo usar
- Quieres contratos pub/sub en .NET 10 con Native AOT retornando ValueTask<Result> sobre In-Memory, RabbitMQ, Azure Service Bus, AWS SQS o Kafka.
Cuándo NO usar
- Solo requieres persistencia atómica Outbox hacia broker desde transacción SQL; combina o usa EricksonLopez.Outbox.
6. Capacidades Principales e Invariantes de Diseño#
Transportes Multi-Broker Desacoplados
Soporta Channels en memoria, RabbitMQ, Azure Service Bus, AWS SQS y Apache Kafka con IBatchMessageTransport.
Middleware de Resiliencia y Analizadores
Circuit breaker, deduplicación, traducción de excepciones, health checks y analizadores Roslyn en compilación.
7. Paquetes NuGet y Adaptadores Incluidos#
| ID del Paquete | Estado | NuGet / Local | TFMs | Estado AOT | Descargas | Descripción |
|---|---|---|---|---|---|---|
| EricksonLopez.MessagingPrincipal | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 399 | High-performance, low-allocation, Native AOT-first distributed messaging framework for .NET 10+ ecosystem. |
| EricksonLopez.Messaging.Abstractions | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 435 | Pure abstractions and contracts for the EricksonLopez.Messaging distributed messaging framework. Provides IMessagePublisher, IMessageConsumer, and message contracts without infrastructure dependencies. |
| EricksonLopez.Messaging.OpenTelemetry | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 307 | OpenTelemetry instrumentation and Semantic Conventions v1.26+ support for EricksonLopez.Messaging. |
| EricksonLopez.Messaging.Kafka | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Incompatible | 292 | Apache Kafka message transport for EricksonLopez.Messaging ecosystem. |
| EricksonLopez.Messaging.RabbitMQ | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 284 | RabbitMQ transport implementation for EricksonLopez.Messaging ecosystem. |
| EricksonLopez.Messaging.Events | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 283 | Transport bridge for EricksonLopez.Events. Implements IEventPublisher backed by EricksonLopez.Messaging.Abstractions for distributed event dispatching across brokers. |
| EricksonLopez.Messaging.Testing | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 282 | Testing utilities for EricksonLopez.Messaging — provides InMemoryTestHarness with published and consumed message tracking for unit and integration tests. |
| EricksonLopez.Messaging.AwsSqs | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 278 | AWS SQS message transport for EricksonLopez.Messaging ecosystem. |
| EricksonLopez.Messaging.AzureServiceBus | Publicado | v2.0.0 / v3.0.0 | net10.0 | AOT: Completo | 276 | Azure Service Bus transport implementation for EricksonLopez.Messaging ecosystem. |
| EricksonLopez.Messaging.GeneratorsAnalizador / Generador | Publicado | v2.0.0 / v3.0.0 | netstandard2.0 | AOT: N/A (Analizador/Legado) | 281 | Roslyn Incremental Source Generator for EricksonLopez.Messaging zero-reflection AOT dispatch and DI registration. |
| EricksonLopez.Messaging.AnalyzersAnalizador / Generador | Publicado | v2.0.0 / v3.0.0 | netstandard2.0 | AOT: N/A (Analizador/Legado) | 262 | Roslyn analyzers for EricksonLopez.Messaging architectural constraints, diagnostics, and code fixes. |
| EricksonLopez.Messaging.Idempotency | No publicado | — / v3.0.0 | net10.0 | AOT: Completo | 0 | Distributed idempotency and deduplication bridge for EricksonLopez.Messaging ecosystem integrating EricksonLopez.Idempotency.Abstractions. |
8. Ejemplo Quick Start#
Basado en APIs públicas verificadas de EricksonLopez.Messaging. Compila con `<ImplicitUsings>disable</ImplicitUsings>` e importaciones explícitas.
using System;
using EricksonLopez.Messaging.Attributes;
using EricksonLopez.Messaging.Contracts;
[MessageType("orders.order-created.v1")]
public sealed record OrderCreatedMessage(
Guid OrderId,
string CustomerNumber,
decimal TotalAmount,
DateTimeOffset CreatedAtUtc) : IMessage;9. Arquitectura y Flujo de Dependencias#
Renderizando diagrama…
flowchart LR lib_messaging["EricksonLopez.Messaging (L3)"] lib_events["EricksonLopez.Events (L0)"] lib_messaging --> lib_events lib_result["EricksonLopez.Result (L0)"] lib_messaging --> lib_result lib_idempotency["EricksonLopez.Idempotency (L2)"] lib_messaging -.-> lib_idempotency
Ver descripción textual y tabla accesible
3 dependencias hacia librerías aguas arriba y 0 librerías dependientes aguas abajo verificadas en dependencies.json.
| Dirección | Librería | Nivel | Tipos de Relación |
|---|---|---|---|
| Aguas arriba | EricksonLopez.Events | L0 | Tiempo de compilación, Paquete NuGet |
| Aguas arriba | EricksonLopez.Result | L0 | Tiempo de compilación, Paquete NuGet |
| Aguas arriba | EricksonLopez.Idempotency | L2 | Adaptador |
flowchart LR
lib_messaging["EricksonLopez.Messaging (L3)"]
lib_events["EricksonLopez.Events (L0)"]
lib_messaging --> lib_events
lib_result["EricksonLopez.Result (L0)"]
lib_messaging --> lib_result
lib_idempotency["EricksonLopez.Idempotency (L2)"]
lib_messaging -.-> lib_idempotency10. Target Frameworks y Matriz Native AOT / Trimming#
Inspección MSBuild `.csproj` sobre 12 paquetes: 9 Full, 0 Partial, 1 Incompatible, 2 NotApplicable (analizadores/generadores).
| ID del Paquete | IsAotCompatible | EnableTrimAnalyzer | Estado AOT Verificado | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.Messaging | true | true | Full | net10.0 |
| EricksonLopez.Messaging.Abstractions | true | true | Full | net10.0 |
| EricksonLopez.Messaging.OpenTelemetry | true | true | Full | net10.0 |
| EricksonLopez.Messaging.Kafka | false | true | Incompatible | net10.0 |
| EricksonLopez.Messaging.RabbitMQ | true | true | Full | net10.0 |
| EricksonLopez.Messaging.Events | true | true | Full | net10.0 |
| EricksonLopez.Messaging.Testing | true | true | Full | net10.0 |
| EricksonLopez.Messaging.AwsSqs | true | true | Full | net10.0 |
| EricksonLopez.Messaging.AzureServiceBus | true | true | Full | net10.0 |
| EricksonLopez.Messaging.Generators | false | false | NotApplicable | netstandard2.0 |
| EricksonLopez.Messaging.Analyzers | false | false | NotApplicable | netstandard2.0 |
| EricksonLopez.Messaging.Idempotency | true | true | Full | net10.0 |
11. Dependencias Aguas Arriba y Dependientes Aguas Abajo#
Dependencias Aguas Arriba (3)
Dependientes Aguas Abajo (0)
Ninguna otra librería EricksonLopez.* depende actualmente de esta familia.
12. Adaptadores Opcionales e Integraciones Externas#
Aristas de Adaptadores Internos y Paquetes de Integración
- EricksonLopez.Messaging.Idempotency→ EricksonLopez.Idempotency.Abstractions (EricksonLopez.Idempotency)
Dependencias NuGet Externas Verificadas (13)
13. Resumen de Configuración y Registro en DI#
Puntos de Entrada DI y Configuración Verificados
MessagingHealthCheckExtensions.AddMessagingHealthCheckRegisters a transient `MessagingHealthCheck` in the service collection.
MessagingHealthCheckExtensions.AddMessagingLivenessCheckRegisters a transient `MessagingHealthCheck` configured specifically for process liveness probes.
MessagingHealthCheckExtensions.AddMessagingReadinessCheckRegisters a transient `MessagingHealthCheck` configured specifically for operational readiness probes.
MessageConsumer.AddDestinationAdds an additional destination queue or topic for subscription prior to starting the consumer.
MessagingEventsServiceCollectionExtensions.AddMessagingEventPublisherRegisters `MessagingEventPublisher` as the `IEventPublisher` implementation in the service container.
MessagingOptionsBuilder.AddCircuitBreakerAdds circuit breaker resilience middleware to the message processing pipeline.
MessagingOptionsBuilder.AddDeduplicationAdds message deduplication middleware to prevent repeated execution of duplicate messages based on message identity.
MessagingOptionsBuilder.AddExceptionHandlingAdds exception handling middleware that catches unhandled exceptions and converts them into `Result.Result` failures, preventing raw exceptions from escaping the pipeline.
MessagingOptionsBuilder.AddHandlerTimeoutAdds handler execution timeout middleware to the message processing pipeline using a configuration delegate.
MessagingOptionsBuilder.AddLoggingAdds structured logging middleware that records message processing events with full context correlation.
MessagingOptionsBuilder.AddMiddleware<TMiddleware>Registers a custom middleware into the message processing pipeline.
MessagingOptionsBuilder.AddRetryAdds retry middleware with exponential backoff and full-jitter randomization to the message processing pipeline.
Tipos Públicos y Contratos Clave
EricksonLopez.Messaging.MessagingHealthCheckExtensions (class)Provides extension methods for registering `MessagingHealthCheck` in health check services.
EricksonLopez.Messaging.Analyzers.Analyzers.DomainBoundaryAnalyzer (class)Provides a Roslyn analyzer that ensures message contracts do not reference domain entities or aggregate roots.
EricksonLopez.Messaging.Analyzers.Analyzers.HandlerAsyncAnalyzer (class)Provides a Roslyn analyzer that detects synchronous blocking calls in message handlers.
EricksonLopez.Messaging.Analyzers.Analyzers.HandlerMustReturnResultAnalyzer (class)Provides a Roslyn analyzer that validates message handlers return `ValueTask<Result>` for functional error handling.
EricksonLopez.Messaging.Analyzers.Analyzers.InvalidHandlerLifetimeAnalyzer (class)Provides a Roslyn analyzer that enforces scoped service lifetime registrations for message handlers.
EricksonLopez.Messaging.Analyzers.Analyzers.MessageTypeAttributeAnalyzer (class)Provides a Roslyn analyzer that verifies all message implementations declare the `[MessageType]` attribute.
EricksonLopez.Messaging.Analyzers.Rules.DiagnosticDescriptors (class)Provides diagnostic descriptors for Roslyn analyzer rules in the messaging framework.
EricksonLopez.Messaging.Attributes.MessageTypeAttribute (class)Specifies a stable, cross-platform string identifier for a message type contract.
EricksonLopez.Messaging.Attributes.PartitionKeyAttribute (class)Specifies that a property within a message contract serves as the partition key for message ordering and routing.
EricksonLopez.Messaging.Contracts.DeadLetterReason (record)Represents a structured reason descriptor detailing why a message was diverted to a dead-letter queue.
EricksonLopez.Messaging.Contracts.IDeadLetterQueue (interface)Defines a mechanism for routing poisoned, invalid, or permanently failing messages to a durable dead-letter queue.
EricksonLopez.Messaging.Contracts.IMessage (interface)Defines a marker interface for all strongly-typed messages transmitted across the messaging system.
14. Benchmarks de Rendimiento Verificados#
Todas las mediciones verificadas provienen estrictamente de `BenchmarkDotNet.Artifacts` ejecutados sobre .NET RyuJIT (existen 0 ejecuciones NativeAOT en esta instantánea).
| Suite | Método | Runtime | Media (ns) | Asignado (B) | Estado |
|---|---|---|---|---|---|
| MessagingBenchmarks | Serialization_Serialize | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 73.08 | 96 | measured |
| MessagingBenchmarks | Deserialization_Deserialize | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 136.76 | 168 | measured |
| MessagingBenchmarks | Dispatch_Simple | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 263.16 | 592 | measured |
| MessagingBenchmarks | Publish_Message | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 287.34 | 520 | measured |
| MessagingBenchmarks | Send_Message | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 287.85 | 480 | measured |
| MessagingBenchmarks | Dispatch_WithDefaultPipeline | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 422.38 | 688 | measured |
| MessagingBenchmarks | Handler_ResolveTypeName | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 675.93 | 448 | measured |
| MessagingBenchmarks | Dispatch_CancelledPath | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 2,614.02 | 1,344 | measured |
15. Historial de Versiones y Estado NuGet vs Repositorio#
Desfase de versiones detectado: la última versión publicada en NuGet.org es v2.0.0, mientras el HEAD del repositorio local está en v3.0.0.
| Versión | Origen | Fecha de Publicación | Resumen |
|---|---|---|---|
| v2.0.0 ↗ | nuget | 2026-09-23 | Published EricksonLopez.Messaging 2.0.0 to NuGet.org. |
| v2.0.0 ↗ | github | 2026-09-23 | [2.0.0](https://github.com/ericksonlopezf/dotnet-messaging/compare/v1.0.0...v2.0.0) (2026-09-23) ⚠ BREAKING CHANGES * implement deduplication pipeline, partition resolution and concurrency controls ✨ Features * implement deduplication pipeline, partition resolution and concurrency controls ([e87fc68](https://github.com/ericksonlopezf/dotnet-messaging/commit/e87fc68433dabb96c2214885b8639bb095e76... |
| v1.0.0 ↗ | github | 2026-08-28 | Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Messaging.Abstractions` | `1.0.0` | | `EricksonLopez.Messaging` | `1.0.0` | | `EricksonLopez.Messaging.Analyzers` | `1.0.0` | | `EricksonLopez.Messaging.AzureServiceBus` | `1.0.0` | | `EricksonLopez.Messaging.Generators` | `1.0.0` | | `EricksonLopez.Messaging.OpenTelemetry` | `1.0.0` | | `EricksonLop... |
| v1.0.0 ↗ | nuget | 2026-08-28 | Published EricksonLopez.Messaging 1.0.0 to NuGet.org. |
16. Librerías Complementarias y Relacionadas#
Librerías en el mismo nivel, capa arquitectónica o vinculadas directamente mediante aristas de dependencia.
17. Documentación, API Reference y Enlaces del Portal#
Documentación Conceptual (Starlight) →
Referencia de API XML Extraída →
25 namespaces · 95 tipos · 338 miembros
Mapa de Dependencias del Ecosistema →
Centro de Aprendizaje y Manual →
Las páginas conceptuales por librería en Starlight se completan en M4; las páginas de API Reference en M3.2.
18. Repositorio Fuente, Licencia y Contribución#
Publicado bajo Licencia MIT. Todos los ensamblados cumplen los invariantes de compilación EricksonLopez.*: importaciones explícitas, firma fuerte (`EricksonLopez.snk`) y metadatos de autor en ASCII (`Erickson Lopez`).
19. Resolución de Problemas, Riesgos y Migración#
- Apunta exclusivamente a net10.0 en los paquetes locales; verifica los indicadores AOT en los subpaquetes de Kafka y brokers cloud.
- Desfase de versiones detectado: la última versión publicada en NuGet.org es v2.0.0, mientras el HEAD del repositorio local está en v3.0.0.
20. Evidencia de Calidad y Verificación#
- Firma Fuerte (`EricksonLopez.snk`)
- EricksonLopez.snk
- `ImplicitUsings=disable`
- disable
- Extracción de Documentación XML
- Verificado (25 namespaces, 95 tipos, 338 miembros)
- Atributos MSBuild AOT / Trimming
- 9 Full / 0 Partial / 1 Incompatible / 2 N/A
- Artefactos BenchmarkDotNet
- 8 total (8 measured, 0 na_error)
Límites Explícitos de Verificación y Alcance
- Todas las mediciones verificadas provienen estrictamente de `BenchmarkDotNet.Artifacts` ejecutados sobre .NET RyuJIT (existen 0 ejecuciones NativeAOT en esta instantánea).
- 1 no publicados