Skip to content

TASK: Make notification transfer-event consumption durable and recoverable #175

Closed

Description

@ramioooz

Parent: STORY: Consume transfer event in notification-service (#60)

Objective

Replace in-memory transfer-event deduplication with a durable notification inbox and explicit terminal failure handling suitable for repeated delivery and process restarts.

Scope

  • Persist consumed event identity, canonical fingerprint, metadata, and processing state in PostgreSQL.
  • Treat an identical event-id and fingerprint as an idempotent replay without creating duplicate notification work.
  • Reject an event-id reused with a different fingerprint as a conflict.
  • Keep processing disabled by default until the governed transfer-event contract and SIT configuration are enabled.
  • Preserve bounded retries and make terminal failures observable through a durable quarantine/DLQ boundary.
  • Add Flyway migration, Testcontainers-backed persistence coverage, and unit tests.
  • Document the recovery and replay policy.

Acceptance criteria

  • Duplicate delivery after an application restart is idempotent.
  • Event-id reuse with a changed payload is rejected and does not overwrite the original record.
  • Inbox state and notification work are committed atomically.
  • Retry exhaustion is recoverable through an explicit quarantine/DLQ record or port.
  • No credentials or customer-sensitive payloads are written to logs.
  • ./mvnw verify passes.

Dependencies

Non-goals

  • External notification provider integration.
  • Transfer saga orchestration.
  • Public notification APIs.

Activity

  1. added theissue type on Aug 31, 2026
  2. self-assigned this
    on Aug 31, 2026
  3. ramioooz commented on Aug 31, 2026

    @ramioooz
    MemberAuthor

    Implementation PR: digital-bank-java/notification-service#5

    This PR implements the durable PostgreSQL inbox and explicit quarantine boundary. It is intentionally stacked on notification-service PR #4; merge #4 first, then review this PR. Related tracking: #60, #137, and #173.

  4. ramioooz commented on Sep 1, 2026

    @ramioooz
    MemberAuthor

    Completed by merged Notification Service PR #5. Durable inbox persistence, replay/conflict handling, and terminal failure behavior are implemented and verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions