Skip to content

2.4 platform-outbox

Sprint: Sprint 02 - Platform Core Libraries
Feature ID: 2.4
Subtasks: 2.4.1

Objective

Deliver "platform-outbox" within Sprint 02 - Platform Core Libraries.

Dependencies

Aggregated from the subtasks below (prerequisite task IDs and enablers):

  • 2.1.3

Subtasks

2.4.1 Outbox core types and service

  • ID: 2.4.1
  • Title: Implement OutboxRecord, OutboxStatus, OutboxStore, OutboxService
  • Description: In com.telco.platform.outbox: OutboxStatus (NEW, PUBLISHED, FAILED); OutboxRecord (id, aggregateType, aggregateId, eventType, payload, headers, traceId, correlationId, createdAt, status); EventSerializer port; OutboxStore port (append, findByStatus, markPublished, markFailed); OutboxService.publish(...); DefaultOutboxService that serializes the payload, captures correlation/trace from CorrelationContextHolder, and appends within the caller's transaction. eventType MUST follow domain.event.v1.
  • Business Purpose: Atomic DB-write-plus-event-intent so Debezium can deliver reliably (ARC-05).
  • Inputs: PLATFORM-SPEC Section 5.
  • Outputs: Outbox core types and DefaultOutboxService.
  • Acceptance Criteria:
  • DefaultOutboxService.publish builds an OutboxRecord with status NEW and a domain.event.v1 eventType, capturing current trace/correlation (unit test with a fake store and context).
  • Dependencies: 2.1.3
  • Complexity: M

Acceptance Criteria

Each subtask above carries its own objective, testable acceptance criteria. This feature is complete when every subtask's acceptance criteria are met.

Deliverables

  • Outbox core types and DefaultOutboxService.

Definition of Done

  • All subtasks (2.4.1) completed and their acceptance criteria verified.
  • All listed dependencies satisfied.
  • Build and tests green per the global conventions in ../README.md (Section 3).