Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/state-machines-and-ownership/concept/concept-messaging-kafka-share-experimental-c03.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

65 lines
3.8 KiB
Markdown

---
kind: CONCEPT
slug: messaging-kafka-share-experimental-c03
title: register가 아무것도 등록하지 않고 활성을 돌려준다
topic: state-machines-and-ownership
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: concept:messaging-kafka-share-experimental-c03
evidenceCapturedOn: 2026-09-01
assets:
- key: messaging-kafka-share-experimental-c03
file: ../../../final/evidence/rendered/messaging-kafka-share-experimental-c03.svg
- key: messaging-kafka-share-experimental-c03-diagram
file: ../../../final/assets/diagrams/messaging-kafka-share-experimental-c03.svg
evidence:
- ../../../final/evidence/raw/messaging-kafka-share-experimental-c03.txt
source:
- 원본 분석 절은 analysis/messaging/messaging-kafka-share-experimental.md#L131 이다.
module: messaging-kafka-share-experimental
---
# register가 아무것도 등록하지 않고 활성을 돌려준다
`register(...)`는 프로파일 검증만 하고 `isActive() == true`인 객체를 반환한다. sink를 저장하지 않으므로 어떤 메시지도 전달되지 않는다.
## 관계
- **허용 의존 목록은 상한이므로 미사용을 잡지 않는다 — 그것을 잡으려면 별도 검사가 필요하다**
같은 분석 리프에서 끌어낸 규칙이다.
- **leaf의 각 public 클래스는 자기 레인에 테스트를 갖는다**
같은 분석 리프에서 끌어낸 규칙이다.
- **에러 메시지가 지시하는 설정은 그 설정을 읽는 코드와 함께 존재해야 한다**
같은 분석 리프에서 끌어낸 규칙이다.
- **구성 오류는 한 예외 타입과 안정 코드로 보고한다**
같은 분석 리프에서 끌어낸 규칙이다.
## 본문
<!-- body:start -->
`KafkaShareProfile`은 다섯 필드이고 생성자가 `shareGroup` 공백과 `maxDeliveryCount < 1`을 거절한다. `maxDeliveryCount`가 javadoc에서 "how many times a record may be re-acquired before it is released"라고 정의된다 — Share Group의 재획득 한계다. **이 필드를 읽는 코드가 이 leaf에 없다.**
## register가 실제로 하는 것
:::evidence key="messaging-kafka-share-experimental-c03-diagram" alt="등록기 경계 안에 프로파일 검증이 들어 있고 소비자 생성과 sink 저장이 경계 밖 빗금 상자로 놓인 구조" caption="register 가 실제로 하는 것" zoom="false"
:::
`TransportConsumerSpec``(DestinationProfile profile, Function<TransportDelivery, CompletionStage<Void>> sink)`이고, `sink`가 플랫폼이 전달마다 부르는 콜백이다. 그 sink가 저장되지 않으므로 **어떤 메시지도 전달되지 않는다.** Kafka 소비자도 만들어지지 않는다 — `kafka-clients`를 import하는 코드가 없다. 즉 `register(...)`**아무것도 등록하지 않고** `isActive() == true`인 객체를 반환한다. §17.
## MessagingCapabilityUnavailableException 참조 위치
:::evidence key="messaging-kafka-share-experimental-c03" alt="코드베이스에서 MessagingCapabilityUnavailableException 를 검색한 출력 37줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="MessagingCapabilityUnavailableException 코드베이스 검색 — 37줄 · exit 0" zoom="true"
:::
## 두 거절의 예외 타입이 다르다
첫째는 `MessagingCapabilityUnavailableException`(카테고리 `CONFIGURATION`, 안정 코드 있음), 둘째는 `IllegalArgumentException`(코드 없음). 둘 다 설정 오류인데 하나만 플랫폼 실패 어휘를 쓴다. §17.
## 에러 메시지가 지목하는 키를 읽는 코드가 없다
에러 메시지가 프로퍼티 키를 직접 적는다 — `backend.messaging.experimental.kafka-share=true`. 그 키를 읽는 코드가 이 저장소에 없다(§12.4).
<!-- body:end -->