Skip to content

Add opt-in watch auto-reconnect helper with checkpoint resume #6

Description

@rawkode

Problem

src/client/watch.rs documents that watch streams do not reconnect automatically.

Impact

Transient network/server failures require manual reconnect logic in every consumer, increasing duplication and risk of dropped change events.

Proposed change

  • Provide an opt-in watch helper/wrapper that:
    • reconnects on transient failures with bounded backoff,
    • resumes from the last checkpoint token,
    • surfaces non-retryable failures immediately.
  • Keep current behavior as default for users who do not opt in.
  • Add tests covering reconnect and checkpoint resume flow.

Acceptance criteria

  • New opt-in API exists for automatic reconnect + resume.
  • Reconnect uses backoff and resumes with the most recent checkpoint token.
  • Non-retryable errors are surfaced without infinite retry.
  • Tests validate reconnect behavior and no-duplication/no-gap resume expectations.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions