Skip to content

[Context]: add Polly resilience adapter for operations #26

Description

@rian-be

Summary

Add a Polly resilience adapter so retry/circuit-breaker policies can be attached to context-scoped operations.

Motivation

Batch operations hitting external APIs need resilience policies (retry, timeout, circuit breaker) without re-implementing them per call site.

Example

var policy = Policy.Handle<HttpRequestException>().RetryAsync(3);

await manager.ExecuteWithPolicy(ctx, policy, async () =>
{
    await externalApi.Call();
});

Design Expectations

  • Adapter-level integration (depends on Polly); Core stays neutural.
  • Policy wraps the context-scoped delegate; context isolation/events unchanged on the delegate.
  • Composition with batch primitives (apply a policy to Each item).

Non-Goals

  • No reimplementation of retry/circuit logic in the library.
  • No defaults — resilience is opt-in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    adapterProtocol / transport integrationsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions