docs(outbox): document single-commit vs 2PC consumer pattern - #40
Merged
Conversation
Add a "Consumer Business Writes: Single-Commit vs 2PC" section to the published Outbox article covering the IOutboxConnectionAccessor pattern: sharing the middleware's pinned connection lets a consumer's business write commit single-phase with the outbox and inbox writes, removing the PostgreSQL max_prepared_transactions requirement. The package README already documented this; the DocFX article did not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Consumer Business Writes: Single-Commit vs 2PC section to the published Outbox article (
docs/articles/outbox.md).The recent outbox changes (sharing the middleware's pinned connection via
IOutboxConnectionAccessorso a consumer's business write commits single-phase with the outbox/inbox writes) were documented in the EF package README, but the published DocFX article was never updated. This closes that gap.Why
DbContextneeds to know how to avoid escalating to a two-phase (prepared) commit, which on PostgreSQL fails by default (max_prepared_transactions = 0).Details
The new section explains:
55000: prepared transactions are disabledfailure mode and its cost.IOutboxConnectionAccessor, removing themax_prepared_transactionsrequirement.(IServiceProvider, DbContextOptionsBuilder)overload, aligned with the article's existingTransferDbContextexample.Docs-only change — no code or behavior affected.