EricksonLopez.Messaging Overview
EricksonLopez.Messaging (2.0.0 on NuGet, L3, 3,379 downloads) provides typed distributed message publishing, multi-handler dispatch, middleware pipelines, schema upcasting, and broker transports with Native AOT JSON serialization.
- Explicit
[MessageType]& zero-reflection serialization (v2.0.0):NativeAotJsonSerializerdropped reflection fallback (DefaultJsonTypeInfoResolverremoved inv2.0.0), andELMSG002enforces[MessageType("...")]onIMessagecontracts. - Pluggable broker transports: Ships
InMemoryMessageTransportby default alongsideRabbitMQ,AzureServiceBus,AwsSqs, andKafka(KafkasetsIsAotCompatible=falsedue toConfluent.Kafka/librdkafka). - Deterministic requeue & dead-lettering (
v2.0.0):MessageConsumerOptions.UnhandledFailureAckResultdefaults toTransportAckResult.NackRequeuewithIDeadLetterQueuerouting, concurrent SQS batching, and deterministicPartitionKeyrouting. - TFM note: Local
.csproj(3.0.0HEAD) targetsnet10.0(netstandard2.0forAnalyzers/Generators), whereas published2.0.0NuGet packages targetednet8.0;net9.0;net10.0.
Rendering diagram…
flowchart LR Pub["IMessagePublisher"] --> Ser["NativeAotJsonSerializer"] Ser --> Tr["IMessageTransport (InMemory / RabbitMQ / ServiceBus / SQS / Kafka)"] Tr --> Cons["IMessageConsumer + MiddlewarePipeline"] Cons --> Disp["IMessageDispatcher -> IMessageHandler<TMessage>"]
View accessible text summary and structure
IMessagePublisher serializes [MessageType] contracts via NativeAotJsonSerializer into IMessageTransport, while MessageConsumer executes middleware and dispatches to IMessageHandler instances.
flowchart LR
Pub["IMessagePublisher"] --> Ser["NativeAotJsonSerializer"]
Ser --> Tr["IMessageTransport (InMemory / RabbitMQ / ServiceBus / SQS / Kafka)"]
Tr --> Cons["IMessageConsumer + MiddlewarePipeline"]
Cons --> Disp["IMessageDispatcher -> IMessageHandler<TMessage>"]Package Roster & Native AOT Status (11 / 12 Published)
Section titled “Package Roster & Native AOT Status (11 / 12 Published)”11 of 12 packages are published at 2.0.0 on NuGet (localVersion: 3.0.0 on disk), while EricksonLopez.Messaging.Idempotency remains unpublished (3.0.0 local only). Overall AOT status is Partial (9 Full, 1 Incompatible, 2 NotApplicable):
| Package | NuGet (2.0.0) |
AOT Status | Role |
|---|---|---|---|
EricksonLopez.Messaging |
Published (399 dl) |
Full |
Core dispatcher, consumer, publisher, middleware, InMemoryMessageTransport |
EricksonLopez.Messaging.Abstractions |
Published (435 dl) |
Full |
IMessage, IMessageHandler<T>, [MessageType], MessageEnvelope<T> |
EricksonLopez.Messaging.OpenTelemetry |
Published (307 dl) |
Full |
AddMessagingInstrumentation() (OpenTelemetry.Trace / OpenTelemetry.Metrics) |
EricksonLopez.Messaging.RabbitMQ / AwsSqs / AzureServiceBus |
Published (284 / 278 / 276 dl) |
Full |
Broker transport implementations |
EricksonLopez.Messaging.Events |
Published (283 dl) |
Full |
AddMessagingEventPublisher() domain event bridge |
EricksonLopez.Messaging.Testing |
Published (282 dl) |
Full |
InMemoryTestHarness (PublishedMessages, ConsumedMessages) |
EricksonLopez.Messaging.Kafka |
Published (292 dl) |
Incompatible |
IsAotCompatible=false (Confluent.Kafka / librdkafka native interop) |
EricksonLopez.Messaging.Generators |
Published (281 dl) |
NotApplicable |
netstandard2.0 Roslyn generator (AddGeneratedMessagingHandlers()) |
EricksonLopez.Messaging.Analyzers |
Published (262 dl) |
NotApplicable |
netstandard2.0 Roslyn diagnostics (ELMSG002, 004, 005, 008, 010) |
EricksonLopez.Messaging.Idempotency |
Unpublished | Full |
Local 3.0.0 only (AddMessagingIdempotency -> IdempotencyStoreDeduplicationAdapter) |
Measured directly from BenchmarkDotNet.Artifacts (8 measured rows, 0 na_error rows) in MessagingBenchmarks on .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI (no NativeAOT reports):
Serialization_Serialize: 73.08 ns / 96 BDeserialization_Deserialize: 136.76 ns / 168 BDispatch_Simple: 263.16 ns / 592 BDispatch_WithDefaultPipeline: 422.38 ns / 688 BDispatch_CancelledPath: 2,614.02 ns / 1,344 BHandler_ResolveTypeName: 675.93 ns / 448 BPublish_Message: 287.34 ns / 520 BSend_Message: 287.85 ns / 480 B