Skip to content

STORY: Add Resilience4j circuit breaker and retry example #65

Closed

Description

@ramioooz

Type: Story
Epic: Observability & Resilience
Slice: Slice 8 - Observability + Deployment
Service: payment-service
Priority: P1

Deliver this work item for the Digital Bank Java production delivery baseline.

Definition of Done:

  • Scope is implemented or documented for the selected delivery slice.
  • Verification steps are documented and repeatable.
  • API requests are added to the Insomnia collection when an API is introduced.

Activity

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

    @ramioooz
    MemberAuthor

    Assessment: not actionable in current payment bootstrap

    Reviewed payment-service at origin/main commit 335b70f (2026-09-05). This story does not have a meaningful production integration point yet, so no Resilience4j dependency, circuit breaker, retry adapter, tests, branch, or PR was created.

    Evidence

    • pom.xml contains Spring MVC, JDBC/Flyway/PostgreSQL, security, Config Client, and test dependencies, but no outbound HTTP client/provider SDK and no Resilience4j dependency.
    • The application boundary is the payment-instruction lifecycle: PaymentInstructionService calls only PaymentInstructionRepository. The concrete outbound adapters are persistence adapters, including PostgresPaymentInstructionRepository; there is no payment-provider call to protect.
    • The service guidance explicitly says provider integration is deferred and must later be isolated behind outbound ports/adapters (AGENTS.md); the README likewise defers provider adapters, Kafka, and saga orchestration (README.md).
    • Baseline verification: ./mvnw --batch-mode --no-transfer-progress test -> 17 tests, 0 failures, build success.

    Delivery decision

    Keep #65 open as a Sprint 6 follow-up, but mark it not-ready for implementation in the current bootstrap. First create and merge the separately tracked payment-rail/provider outbound port, contract, and concrete client adapter (with an explicit idempotency/side-effect policy). Then implement #65 at that adapter boundary with bounded retry/circuit-breaker settings, retryable transport failures only, no retry of definitive 4xx/business failures, and focused adapter tests.

    No child task was created, so there is no parent relationship to repair; #65 remains assigned to ramioooz and mapped to Sprint 6 - Operational Resilience and Observability.

    Related work and merge order

    The current payment bootstrap/lifecycle chain is already merged in this order: payment-service PR #1 -> #2 -> #3 -> #4 -> #5 -> #6, followed by SIT/runtime/quality updates #7, #8, and #9 into main. Those provide the current baseline; they do not introduce a provider client.

    Future order: provider integration story/adapter first; then #65; then any provider-specific SIT verification or operational runbook. No PR or merge is applicable for #65 from this bootstrap state.

  4. ramioooz commented on Sep 5, 2026

    @ramioooz
    MemberAuthor

    Superseded by the completed API Gateway resilience scope. Circuit breaking and safe retries were delivered in api-gateway#20 and integrated in api-gateway#22; Redis-backed rate limiting was delivered in api-gateway#21. Keeping this generic story open would duplicate the implemented gateway capability. If payment-provider-specific resilience is required later, create a new concrete child under the Sprint 5 payment story with an identified downstream dependency.

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