Skip to main content

Resilience: hbf-client-integrations

Error handling and retry patterns for this service. Platform-wide patterns: docs/architecture/resilience.md

HTTP Retry

  • Library: got with retry enabled for GET, POST, PUT, PATCH, DELETE
  • Attempts: 3 (got default)
  • Backoff: Exponential with jitter (got default, not explicitly configured)
  • On failure: HttpException thrown with status code; 409 CONFLICT treated as non-fatal in post()

Queue Retry (if applicable)

N/A

Timeouts

CallTimeoutConfigured in
General requestsDISTRIBUTER_SERVICE_REQUEST_TIMEOUT env var or 5000ms fallbackEnvironment config
Client module requestsDISTRIBUTER_SERVICE_REQUEST_TIMEOUT env var or 15000ms fallbackEnvironment config
kelly-hbf-interaction60000ms (60s)Hardcoded
getBuffer()No timeoutN/A

Circuit Breakers

None.

Fallback Strategy

Failure scenarioBehaviourUser impact
HTTP errorHttpException thrown with upstream status codeError propagated to caller
409 CONFLICT on POSTTreated as non-fatal, request continuesNo user impact

Known Gaps

  • No timeout on getBuffer() calls (may hang indefinitely on large payloads).
  • Backoff configuration relies on got defaults without explicit tuning.
  • No circuit breaker across 15+ client services in /distributor/clients/.
  • No DLQ for failed requests.
  • No health endpoint.