Core Concepts — Outbox, Inbox, Contracts & DispatchResult
EricksonLopez.Outbox separates transactional message staging (IOutbox) from asynchronous broker delivery (IBrokerPublisher) and consumer-side deduplication (EricksonLopez.Inbox).
Message Contracts & Native AOT Serialization
Section titled “Message Contracts & Native AOT Serialization”[OutboxMessage("alias")](EricksonLopez.Outbox.Contracts): Assigns a stable type alias persisted in thetypecolumn so refactoring C# namespaces never breaks stored messages.NativeAotJsonSerializer/ MessagePack / Protobuf: Zero-reflection serializers paired withArrayPoolBufferWriter<byte>andInMemoryMessageTypeResolver(orUseGeneratedTypes(...)fromEricksonLopez.Outbox.SourceGenerators).
Transactional Enlistment & IBrokerPublisher Contract
Section titled “Transactional Enlistment & IBrokerPublisher Contract”DbTransactionContext/ToOutboxContext()(EricksonLopez.Outbox.Persistence): Wraps an activeDbTransaction(v3.0.0BC-018throwsArgumentNullExceptionon null transactions) sooutbox.Publish(evt).StoreAsync(txContext, ct)commits or rolls back atomically with domain writes.IBrokerPublisher.PublishRawAsync(...): Implementations must never throw or returndefault(DispatchResult). Always returnDispatchResult.Ok(),DispatchResult.FailAndRetry(ex), orDispatchResult.FailFatal(ex).
AddInbox()/AddInMemoryInbox()(EricksonLopez.Inbox): Tracks processed message IDs usingEricksonLopez.Idempotency.Abstractions.AddInboxDeduplication()(EricksonLopez.Outbox.Inbox): Middleware and[InboxConsumer]verification (OUTBOX003) to prevent duplicate side effects on at-least-once broker deliveries.