Skip to content

feat(om): expose Orleans 10.4 stream subscription start positions #284

Description

@egil

Release Baseline

All OM packages in this release will consistently require Orleans 10.4.0; the Journaling dependency is 10.4.0-alpha.1. Consumers must upgrade Orleans along with OM. This supersedes the earlier 10.3.1 runtime-compatibility requirement. Preserve persisted-data compatibility and recovery evidence. Optional #283/#284 remain deferred.

Context

dotnet/orleans#10936 adds StreamSubscriptionStartPosition.Latest and EarliestAvailable, along with a pulling-agent provider default. EarliestAvailable means the oldest retained message for that stream in the local queue cache, not the beginning of broker history. An explicit checkpoint takes precedence.

OM's StreamSubscriptionOptions exposes tracked-token resumption but no start-position option. StreamManager currently passes a tracked token or null when creating an explicit subscription and attaching/resuming handlers.

Work

  • Add opt-in configuration for a subscription's initial start position through StreamManager's existing options.
  • Distinguish an unset option (preserve existing/provider default behavior) from an explicit Latest or EarliestAvailable choice.
  • Use the new public SubscribeAsync start-position extension where no tracked token exists. Preserve durable handle reuse and the existing provider/full StreamId checkpoint lookup.
  • Establish the supported behavior for explicit creation, existing explicit handle resumption and implicit attachment from the actual 10.4 APIs. Those paths are not interchangeable: do not promise a start-position resume overload where none exists. Use provider-level configuration where appropriate and document any limitation.
  • Explain local-cache retention, non-rewindable/custom-provider limitations and rolling deployment: pulling-agent silos must support the new enum before enabling it.

Acceptance

  • Default configuration retains current behavior and existing handles are not duplicated.
  • Real persistent-stream coverage distinguishes Latest from EarliestAvailable with messages already in cache; an empty cache waits for future messages.
  • A non-null tracked checkpoint wins over initial start-position configuration.
  • Unset configuration respects the provider default; explicit Latest can override an EarliestAvailable provider default.
  • Unsupported provider/attachment modes and invalid enum values have deliberate, documented behavior, rather than silently promising replay.
  • Reactivation continues to resume the correct provider/full StreamId and keeps existing error/telemetry behavior.
  • README/API examples describe cache-limited history and the safe rollout order.

This is an optional feature after the coordinated Orleans 10.4 upgrade #285.

Reviewed against OM source at 2b5d24614ff08a9028ebc61995308176dbb90841; current main at fcca835c3141ac32874c70f687583d2c49ae4847 differs only in OM's version file.

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