Skip to content

feat: implement circuit breaker for Horizon RPC and advanced DLQ mana… - #174

Merged
K1NGD4VID merged 2 commits into
ASTROIDX556:mainfrom
fadesany:feat/circuit-breaker-dlq-management
Aug 31, 2026
Merged

feat: implement circuit breaker for Horizon RPC and advanced DLQ mana…#174
K1NGD4VID merged 2 commits into
ASTROIDX556:mainfrom
fadesany:feat/circuit-breaker-dlq-management

Conversation

@fadesany

Copy link
Copy Markdown
Contributor

…gement

Implement circuit breaker pattern and fallback handlers for Stellar Horizon RPC calls (#70), and add queue management service with batch retry/purge and health endpoints for dead-letter queue administration (#69).

Issue #70 — Circuit breaker & fallback handlers:

  • Core CircuitBreaker class with CLOSED/OPEN/HALF_OPEN state machine
  • HorizonCircuitBreakerService wrapping the breaker with configurable thresholds, fallback strategies, and monitoring event emission
  • HorizonCircuitBreakerInterceptor for NestJS controller-level protection
  • isRpcFailure classifier for network errors, 5xx, and DomainException exclusion
  • Integrated into StellarService.wrap() for all outbound Horizon calls
  • Wired HorizonCircuitBreakerService into StellarModule provider/export

Issue #69 — DLQ management & requeue endpoints:

  • QueueManagementService with paginated failed job listing, advanced filtering (reason substring, job name, time range), and derived status inspection (failed/exhausted/unrecoverable)
  • QueueManagementController with RBAC-protected endpoints for batch retry, batch purge, job inspection, and queue health snapshots
  • Zod validation DTOs for all queue management inputs

Both features fully tested with vitest — 756 tests passing.

Closes #70
Closes #69

🤖 Generated with Codebuff

Summary

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • CI / tooling

Related issue

Closes #

Checklist

  • npm run build passes
  • npm test passes
  • npm run lint passes
  • npm run typecheck passes
  • No secrets added to tracked files
  • PR description explains the why, not just the what

…gement

Implement circuit breaker pattern and fallback handlers for Stellar Horizon
RPC calls (ASTROIDX556#70), and add queue management service with batch retry/purge
and health endpoints for dead-letter queue administration (ASTROIDX556#69).

Issue ASTROIDX556#70 — Circuit breaker & fallback handlers:
- Core CircuitBreaker class with CLOSED/OPEN/HALF_OPEN state machine
- HorizonCircuitBreakerService wrapping the breaker with configurable
  thresholds, fallback strategies, and monitoring event emission
- HorizonCircuitBreakerInterceptor for NestJS controller-level protection
- isRpcFailure classifier for network errors, 5xx, and DomainException exclusion
- Integrated into StellarService.wrap() for all outbound Horizon calls
- Wired HorizonCircuitBreakerService into StellarModule provider/export

Issue ASTROIDX556#69 — DLQ management & requeue endpoints:
- QueueManagementService with paginated failed job listing, advanced
  filtering (reason substring, job name, time range), and derived status
  inspection (failed/exhausted/unrecoverable)
- QueueManagementController with RBAC-protected endpoints for batch retry,
  batch purge, job inspection, and queue health snapshots
- Zod validation DTOs for all queue management inputs

Both features fully tested with vitest — 756 tests passing.

Closes ASTROIDX556#70
Closes ASTROIDX556#69

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@fadesany Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@K1NGD4VID
K1NGD4VID merged commit ea9fb0c into ASTROIDX556:main Aug 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement circuit breaker and fallback handlers for Stellar Horizon RPC calls Add dead-letter queue management and administrative requeue endpoints

2 participants