Files
messaging-library/messaging/messaging-spring-boot-starter/build.gradle
T
donghyeon-kaandClaude Opus 5.5 763392c8b2 review-followup Wave 3 라운드 3(P21): messaging 플랫폼 — Kafka 소비(MessageHandler 하나), API 정리
- 결정 10: consume 계약을 `MessageHandler<T>` 하나로, starter-kafka가 consumer 조립(handler bean이 있으면 켜짐,
  `app.messaging.enabled=false`로 끔). 오프셋은 handler Success(inbox면 트랜잭션 커밋) 뒤 또는 DLQ 쓰기 확인 뒤에만 커밋,
  auto-commit 금지, `read_committed`, 재시도 소진 → DLQ(없으면 멈춤) — Kafka+PG로 왕복·중복 제거·DLQ 검증
- 미사용 API 타입·Blocking/Reactive/Batch facade·reactor api 노출 삭제, `PublishResult` 정적 factory,
  `MessagingCapabilities` → EnumSet, API leaf 병합(core-api+schema-api, admin-api+admin-runtime), starter god config 분해,
  Kafka broker 설정은 starter-kafka로, 등급 용어 정리
- 결함 수정: Retry 응답이 시도 횟수를 세지 않아 partition 정지(P21-new-1), deliveryAttempt 항상 1(P21-new-2)
- 통합: app-bootstrap `MessagingPublicSurfaceContractTest` 기대값을 P21 변경에 맞춤, starter-kafka에 `api kafka-clients`

검증: ./gradlew check architectureCheck verifyDependencyLocks :app-bootstrap:verifyEnvKeys :app-bootstrap:integrationTest
:sample-portfolio:integrationTest :messaging:messaging-spring-boot-starter:integrationTest
:messaging:messaging-reliability-jdbc-postgresql:integrationTest mainCheck --continue 통과(812 task)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 13:29:46 +09:00

74 lines
3.8 KiB
Groovy

plugins {
id 'ca.auxiliary-source-set'
id 'ca.platform-module'
id 'ca.spring-config'
}
// Scopes, not a flat list of `api`.
//
// `api` is the types that genuinely appear in this module's public signatures; everything else is
// `implementation`. Broker transports live in capability starters (messaging-spring-boot-starter-kafka),
// so this starter's compile classpath carries no broker SDK.
auxiliarySourceSets {
sourceSet('integrationTest') {
compilesAgainst 'main'
}
}
dependencies {
// Types an adopter writes against: envelopes, destinations, publish results, profiles, ports.
api project(':messaging:messaging-core-api')
api project(':messaging:messaging-policy')
api project(':messaging:messaging-transport-spi')
api project(':messaging:messaging-observability')
api project(':messaging:messaging-security')
api project(':messaging:messaging-reliability-api')
// Wired by the auto-configurations and never named in an adopter's source.
implementation project(':messaging:messaging-schema-json')
// The publisher and its collaborators live here. The starter did not depend on it at all,
// which is why MessagingCoreAutoConfiguration consumed a MessagePublisher that nothing in
// reach could produce (MSG-INT-003).
implementation project(':messaging:messaging-runtime-core')
// The relay and consumer logic, and the PostgreSQL stores behind their ports.
implementation project(':messaging:messaging-reliability')
implementation project(':messaging:messaging-reliability-jdbc-postgresql')
implementation project(':messaging:messaging-admin')
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-actuator'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
// Provider auto-configurations live in capability artifacts. Tests that exercise provider
// selection add it only to the test graph; the production starter remains broker-neutral.
testImplementation project(':messaging:messaging-spring-boot-starter-kafka')
// Test-only, and specifically so the configuration reference can be executed rather than read:
// MessagingConfigurationBindingTest loads the YAML blocks out of the shipped document and boots
// a context on them. Spring Boot 4 treats snakeyaml as optional, so a document-driven test has
// to ask for it; production code does not, and adding it here keeps that asymmetry visible.
testImplementation 'org.yaml:snakeyaml'
// The live round trip. MSG-INT-003's membership rule is that the starter earns
// app-bootstrap membership in the same change that proves a real broker round trip,
// so the proof has to run somewhere — and the starter is where the whole platform
// assembles.
integrationTestImplementation project(':messaging:messaging-spring-boot-starter-kafka')
integrationTestImplementation 'org.testcontainers:testcontainers-junit-jupiter'
integrationTestImplementation 'org.testcontainers:testcontainers-kafka'
// The consume round trip's inbox lane: a real PostgreSQL behind the JDBC inbox, joined to the
// handler's own write by a real transaction manager.
integrationTestImplementation project(':messaging:messaging-reliability')
integrationTestImplementation project(':messaging:messaging-reliability-jdbc-postgresql')
integrationTestImplementation 'org.springframework:spring-jdbc'
integrationTestImplementation 'org.testcontainers:testcontainers-postgresql'
integrationTestImplementation 'org.postgresql:postgresql'
}
strictTestLanes {
lane('integrationTest') {
integration()
sourceSet = 'integrationTest'
description = 'Runs the assembled messaging starter round trip against real Kafka.'
}
}