Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/transaction-and-consistency-models/concept/concept-messaging-outbox-jdbc-postgresql-c01.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.

Follows the import procedure in README.md.

  source/     the originating repository verbatim — 78 documents, 28 SVGs,
              8 manifests, plus .source-revision recording the commit
  final/      the SSOT
    document.md   729 lines written from the 29 experiment documents, not
                  concatenated: what was predicted, what was measured, and
                  where the measurement itself was wrong
    evidence/raw    125 outputs, flattened to <experiment>__<file> because
                    the originals collided (01-baseline.txt appeared three
                    times) and the audit only globs the top level
    evidence/meta   one per raw file; command and exitCode are null and the
                    README says why rather than inventing them
    evidence/browser  22 captures
    assets/       three diagrams through techviz
    .techviz/     their VizSpecs

A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.

Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.

verify-pipeline.py passes. audit-records.py reports no issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:51:59 +09:00

3.1 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module
kind slug title topic project status sourceRevision rootTreeNode evidenceCapturedOn assets evidence source module
CONCEPT messaging-outbox-jdbc-postgresql-c01 모르는 것을 실패로 취급하지 않는다 transaction-and-consistency-models clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 concept:messaging-outbox-jdbc-postgresql-c01 2026-09-01
key file
messaging-outbox-jdbc-postgresql-c01 ../../../final/evidence/rendered/messaging-outbox-jdbc-postgresql-c01.svg
key file
messaging-outbox-jdbc-postgresql-c01-diagram ../../../final/assets/diagrams/messaging-outbox-jdbc-postgresql-c01.svg
../../../final/evidence/raw/messaging-outbox-jdbc-postgresql-c01.txt
원본 분석 절은 analysis/messaging/messaging-outbox-jdbc-postgresql.md#L66 이다.
messaging-outbox-jdbc-postgresql

모르는 것을 실패로 취급하지 않는다

트랜잭셔널 아웃박스의 PostgreSQL 구현이다. 이 리프의 축은 하나다 — 모호한 발행을 같은 메시지 id로 재시도한다.

본문

트랜잭셔널 아웃박스의 PostgreSQL 구현이다. 비즈니스 트랜잭션이 쓰고 릴레이가 배출한다. 이 리프의 축은 하나다: "모르는 것을 실패로 취급하지 않는다."

"The relay's correctness rests on one rule: an ambiguous publish is retried under the same message id. Minting a new id would turn a possibly-delivered message into a definitely-second message, and no downstream deduplication could recover from it. Marking it failed instead would lose a message the broker may already hold."

마지막 문장이 중요하다 — 릴레이는 at-least-once publication만 보장한다고 자기 상한을 스스로 명시한다.

이 리프가 아는 것과 모르는 것

:::evidence key="messaging-outbox-jdbc-postgresql-c01-diagram" alt="리프 경계 안에 발행 포트와 관계형 데이터베이스가 들어 있고 브로커와 스프링 컨텍스트가 경계 밖 점선 상자로 놓인 구조" caption="이 리프가 아는 것과 모르는 것" zoom="false" :::

경계: 브로커를 모른다(MessagePublisher 포트만 안다). 스프링 컨텍스트를 모른다(spring-jdbc/spring-tximplementation 이며 트랜잭션 동기화 조회에만 쓴다). 배선은 starter 몫이다.

MessagePublisher 참조 위치

:::evidence key="messaging-outbox-jdbc-postgresql-c01" alt="코드베이스에서 MessagePublisher 를 검색한 출력 14줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="MessagePublisher 코드베이스 검색 — 14줄 · exit 0" zoom="true" :::

파괴적 작업 저널이 같이 사는 이유

messaging-admin-api 의 파괴적 작업 저널 구현도 이 리프에 산다. build.gradle 이 그 이유를 적는다 — "The destructive-operation journal lives here because it needs exactly what the outbox needs: one relational database every replica can see, and a migration lane that already exists. The contract it implements belongs to the admin API."