Skip to content

Compliance suite: subscriptions #5151

Description

@jeremydmiller

Part of #5118 (compliance wave growth), epic #5110.

Subscriptions — raw event delivery to user code off the daemon, with checkpointing — are a first-class JasperFx.Events concept (ISubscriptionSource<TOperations, TQuerySession>, JasperFxSubscriptionBase, ISubscriptionController, SubscriptionAgent), implemented and tested in both products, and untested cross-store.

The subscription base is generic over the same <TOperations, TQuerySession> pair the compliance fixture is already generic over, so a compliance subscription can be declared directly in the shared source with no alias gymnastics — this is one of the cleaner ports left.

Seam additions required

  1. ComplianceStoreConfig.AddSubscription(...) on the config + IComplianceStoreRegistrar — both products register subscriptions through their own options object, so this follows the existing AddProjection pattern exactly.
  2. Nothing else — driving and asserting runs through IProjectionDaemon and the shared controller interfaces the fixture already exposes.

What each store tests today

Marten Polecat
DaemonTests subscription tests (incl. subscription_registrations_through_host, subscribe_from_present) Subscriptions/subscription_tests.cs
EventSourcingTests subscription registration tests Daemon/projection_coordinator_disabled_mode_tests.cs (partial)

Scope

New SubscriptionCompliance suite:

  1. A registered subscription receives every appended event exactly once, in sequence order
  2. Checkpointing: stop the daemon mid-stream, restart, and delivery resumes without replay or gaps
  3. Event-type filtering on the subscription only delivers the filtered types
  4. Subscribe-from-present skips pre-existing events; subscribe-from-beginning does not
  5. A subscription that throws follows the same dead-letter/skip contract as a projection (cross-check against the dead-letter suite; assert the shared half only)
  6. The subscription's own session participates in the same unit of work as the events it processes

Acceptance

  • One registrar addition; suite enrolled in both stores
  • Originals retired for the absorbed behavior in both repos

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