Skip to content

Expose the $all position on RecordedEvent #252

Description

@condron

Summary

Add a nullable Position (the global $all commit/prepare position) to RecordedEvent so a
delivered event can carry its $all position, enabling position-based correlation and resume from
any read or subscription whose backend reports it.

Status — implemented on branch chris/recorded-event-all-position

  • RecordedEvent gains an optional Position? position = null ctor param and a
    public readonly Position? Position field; ProjectedEvent passes it through. Optional/defaulted,
    so existing call sites are unchanged (backward compatible).
  • EventStoreConnectionWrapper.ToDeliveredEvent populates it from ResolvedEvent.OriginalPosition,
    which the store sets on $all reads/subscriptions (null on plain stream reads against stores that
    don't carry it).
  • ReactiveDomain.Testing.Tests green (23/23, net8.0 + net10.0).

Why / downstream

Requested by downstream StreamStore: its host emits the $all position on stream reads
(Streams.Read.cs sets CommitPosition = m.position), unlike real EventStore, which only sets
OriginalPosition on $all. Once this field ships in a package, StreamStore's
ESDBConnectionWrapper.ToRecordedEventRD can surface Position from OriginalPosition so that
stream reads carry the $all position — a capability the real-ESDB backend can't provide.

Follow-up

  • Review + merge chris/recorded-event-all-position.
  • Release (e.g. 0.15.3) so StreamStore can consume the field.
  • Downstream StreamStore: bump to the released version; wire ToRecordedEventRD and DataStore
    (LocalDataStore) to populate Position; add a stream-read-position conformance test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions