docs: 013 phase 2 — PostgreSQL for both transport and Outbox - #153
Merged
Conversation
Adds contents/PostgreSQLTransportAndOutbox.md, the guide Docs#67 is owed: one PostgreSQL database as broker and Outbox, so the business write and the message announcing it commit together. Nine steps, a failures section naming the exceptions by their text, nested under PostgreSQL Message Broker. Every code block is compiled, and step 9's output is measured on a real run of the companion sample in BrighterCommand/Brighter#4304 — which extends the existing PostgresTaskQueue sample and reuses its receiver unchanged. Four defects repaired on the two pages this guide names as prerequisites, each found by compiling them and none in P0-2 or P0-4's scope: PostgresOutbox.md:61 CS1739 — GetDDL's parameter is binaryMessagePayload on PostgreSql, while MsSql, MySql and Sqlite spell it hasBinaryMessagePayload PostgresOutbox.md:68-95 the printed DDL is not what GetDDL emits at 10.7.0 PostgreSQLMessageBroker.md:91 CS1503 — the producer registry factory takes a PostgresMessagingGatewayConnection PostgreSQLMessageBroker.md:44 the queue DDL is not what the transport runs Design §4.1's first named failure was stale: the registration guard added in Brighter#3952 ships in 10.7.0, so a V10 reader meets a ConfigurationException from AddProducers rather than the sweeper's "No Async outbox defined." The page prints the measured exception and names the older one as its historical equivalent. Gates: link 160 -> 161, pagelint 158 -> 159 pages and 773 -> 772 warnings, shape 157 -> 158 with the widest section unmoved at 12 of 20, redirects, versioncheck and optioncheck all unmoved. --changed reported 17 code blocks strict, 0 errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146UueHL6H3zGBGTYwz7GtL
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.
Spec 013, phase 2. Adds the guide Docs#67 is owed: one PostgreSQL database as both broker and Outbox, so the business write and the message announcing it commit in a single transaction.
contents/PostgreSQLTransportAndOutbox.md— How-to, 358 lines, nine## Step N:headings, nested under PostgreSQL Message Broker. The pivot is thatRelationalDatabaseConfigurationtakesqueueStoreTableandoutBoxTableNameas two parameters on one object, so there is no second configuration to reconcile.The companion sample — Q4 answered yes
BrighterCommand/Brighter#4304 adds
GreetingsSenderWithOutboxto the existingPostgresTaskQueuesample and registers it inBrighter.slnx. It extends rather than creates —GreetingsandGreetingsReceiverConsoleare reused unchanged.Step 9 is measured, not asserted. The sample was run against
docker-compose-postgres.yaml: deposit,Found 1 to clear out of amount 100,Decoupled invocation of message: Topic:greeting.event, then the receiver consumes and deletes it. Run with--failand the row counts ingreetingandoutboxare both unchanged, so neither write survived.Four defects repaired on this guide's own prerequisites
Found by compiling the two pages the new page's banner points at, and none of them in P0-2's or P0-4's scope:
PostgresOutbox.md:61GetDDL(tableName, hasBinaryMessagePayload: true)CS1739— PostgreSql's parameter isbinaryMessagePayload; MsSql, MySql and Sqlite are the ones that spell ithas…PostgresOutbox.md:68-95GetDDL("Outbox")"will generate""outbox",Id bigserial PRIMARY KEY,DataRef,SpecVersion, noCreated/CreatedIDPostgreSQLMessageBroker.md:91PostgresProducerRegistryFactory(postgresConfiguration, …)CS1503— it takes aPostgresMessagingGatewayConnectionPostgreSQLMessageBroker.md:44-55BIGSERIAL PRIMARY KEY,TIMESTAMP … DEFAULT,JSONB NOT NULLBIGINT GENERATED ALWAYS AS IDENTITY,TIMESTAMPTZ,JSON, index withINCLUDE ("id")The repaired DDL was printed from the released 10.7.0 package, not from
src/—origin/masteremits aCausationIdcolumn and an index that no released version has.One stale premise corrected
Design §4.1 had the page print
InvalidOperationException: No Async outbox defined.(Q&A #3795). Probing it produces something else:ConfigurationException: Unable to register outbox of type PostgreSqlOutbox - no transaction provider has been registered that matches the outbox's transaction type, thrown fromAddProducersat registration. That guard was added in Brighter#3952 on 2026-01-19 and ships in 10.7.0, so a V10 reader cannot reach the sweeper message by this route. The page prints the measured exception and names the older one as its historical equivalent, since that is the string still in search results.Gates
linkcheck.pypagelint.pyurlmap.py --check-shapeurlmap.py --check-redirectsversioncheck.pyoptioncheckpagelint.py --changed origin/masterreports 17 code block(s) strict, 0 errors — the new page's 13 blocks plus the four repaired ones, so the pass is not vacuous.Full write-up, including six findings the task list did not predict, is in
spec/013-howto_guides/tasks.md§ Phase 2 as executed. 24 of 43 tasks now ticked.🤖 Generated with Claude Code
https://claude.ai/code/session_0146UueHL6H3zGBGTYwz7GtL