Ir al contenido

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.

EricksonLopez.Outbox — Visión General

EricksonLopez.Outbox (3.0.0 en NuGet, L3, 34,518 descargas) implementa los patrones Transactional Outbox e Inbox con serialización ArrayPoolBufferWriter<byte>, sondeo con FOR UPDATE SKIP LOCKED / sin bloqueos en 7 motores de base de datos, 8 adaptadores de brokers y soporte Native AOT sin reflexión para JSON, MessagePack y Protobuf.

  • Persistencia atómica de estado y eventos: Los eventos registrados mediante IOutbox.Publish(...) comparten la misma transacción de base de datos (DbTransactionContext / ToOutboxContext()) para evitar divergencias.
  • Deduplicación idempotente con Inbox: EricksonLopez.Inbox y EricksonLopez.Inbox.Abstractions (EricksonLopez.Outbox.Inbox) garantizan efectos al menos/como máximo una vez respaldados por EricksonLopez.Idempotency.Abstractions.
  • Saneamiento de credenciales (v3.0.0): DefaultErrorSanitizer enmascara tokens Bearer y credenciales (***REDACTED***), y DbTransactionContext rechaza transacciones nulas.
  • Precisión de espacios de nombres: AddOutbox(), AddOutboxDispatcher() y AddOutboxInbox() viven en namespace EricksonLopez.Outbox.Hosting;, mientras RabbitMQBrokerPublisher vive en namespace EricksonLopez.Outbox.RabbitMQ;.
flowchart LR
Tx["DbTransactionContext"] --> Store["IOutboxRepository (PostgreSQL / SQL Server / ...)"]
Store -- SKIP LOCKED --> Disp["OutboxDispatcher + RetryDispatcherInterceptor"]
Disp --> Broker["IBrokerPublisher (RabbitMQ / Kafka / SQS / ...)"]
Broker --> Inbox["IInboxDeduplication -> [InboxConsumer]"]
Flujo de Entrega Outbox Transaccional e InboxLa transacción de dominio guarda estado y filas OutboxMessage atómicamente, OutboxDispatcher sondea con SKIP LOCKED para publicar vía IBrokerPublisher e Inbox deduplica en el consumidor.
Ver descripción textual y tabla accesible

La transacción de dominio guarda estado y filas OutboxMessage atómicamente, OutboxDispatcher sondea con SKIP LOCKED para publicar vía IBrokerPublisher e Inbox deduplica en el consumidor.

flowchart LR
Tx["DbTransactionContext"] --> Store["IOutboxRepository (PostgreSQL / SQL Server / ...)"]
Store -- SKIP LOCKED --> Disp["OutboxDispatcher + RetryDispatcherInterceptor"]
Disp --> Broker["IBrokerPublisher (RabbitMQ / Kafka / SQS / ...)"]
Broker --> Inbox["IInboxDeduplication -> [InboxConsumer]"]

36 de 38 paquetes están publicados en 3.0.0 en NuGet (net8.0;net9.0;net10.0; netstandard2.0 para herramientas Roslyn; localVersion: 4.2.0 en disco), incluyendo EricksonLopez.Inbox y EricksonLopez.Inbox.Abstractions. Estado AOT global Partial (31 Full, 5 Incompatible, 2 NotApplicable):

  • Núcleo, Inbox y Serialización (Full, 3.0.0): Outbox (1,940), Outbox.Abstractions (1,524), Inbox (763), Inbox.Abstractions (800), Outbox.Events (744), Outbox.Inbox (732), Outbox.Inbox.AspNetCore (736), Outbox.Inbox.Events (721), Outbox.EntityFrameworkCore (1,051), Outbox.Mediator (681), Outbox.Aspire (708), Outbox.Dapr (705), Serialization.MessagePack (726), Serialization.Protobuf (1,012).
  • Proveedores de Almacenamiento (Full, 3.0.0): PostgreSql (1,245), SqlServer (1,083), MySql (1,095), MariaDb (680), Oracle (1,146), Sqlite (1,072), MongoDb (716).
  • Brokers (Full, 3.0.0): AwsSqs (1,134), AzureEventHubs (720), AzureServiceBus (1,075), GooglePubSub (1,108), Kafka (1,066), Nats (1,094), RabbitMQ (1,133), RedisStreams (1,047).
  • Puentes de Bus Incompatibles (IsAotCompatible=false, 3.0.0): Brighter (807), MassTransit (1,109), MediatR (694, obsoleto a favor de Mediator según ADR-036), NServiceBus (709), Rebus (766).
  • Herramientas Roslyn (NotApplicable, 3.0.0, netstandard2.0): Analyzers (1,082, OUTBOX001–OUTBOX013), SourceGenerators (1,094, OUTBOXSG001–OUTBOXSG003).
  • Paquetes Locales sin Publicar (localVersion: 4.2.0, Full): EricksonLopez.Inbox.PostgreSql y EricksonLopez.Outbox.OpenTelemetry (0 descargas en NuGet — solo workspace local).

Medidos desde BenchmarkDotNet.Artifacts (75 filas totales: 40 measured, 35 na_error) en .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI (sin reportes NativeAOT):

  • CreateMessageMetadata: 1.985–2.39 ns / 56 B; CreateOutboxMessage: 67.764–78.069 ns / 208 B
  • Serialize_BufferWriter: 53.83–78.51 ns / 32 B (payload pequeño; 323.54–336.76 ns mediano; 3,379.6–3,419.04 ns grande — siempre 32 B frente a Serialize_Allocating hasta 102,573 B)
  • InMemory_GetAlias: 1.369–1.391 ns / 0 B; InMemory_Resolve: 2.594–2.642 ns / 0 B
  • Outbox_StoreAsync (comparativa): 245.1–256.3 ns / 448 B frente a CAP_StoreAsync (827.4–855.7 ns / 1,664 B) y NServiceBus_StoreAsync (25,105.5–25,423.8 ns / 5,457 B)
  • ZeroMiddlewares: 4.463 ns / 0 B; OneMiddleware: 8.866 ns / 0 B; ThreeMiddlewares: 10.761 ns / 0 B
  • Divulgación na_error (35 filas): Las filas de base de datos, MassTransit, Wolverine, paralelo y fetch registraron Mean = NA en BenchmarkDotNet y se excluyen de las métricas medidas.