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
ComplianceStoreConfig.AddSubscription(...) on the config + IComplianceStoreRegistrar — both products register subscriptions through their own options object, so this follows the existing AddProjection pattern exactly.
- 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:
- A registered subscription receives every appended event exactly once, in sequence order
- Checkpointing: stop the daemon mid-stream, restart, and delivery resumes without replay or gaps
- Event-type filtering on the subscription only delivers the filtered types
- Subscribe-from-present skips pre-existing events; subscribe-from-beginning does not
- 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)
- 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
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
ComplianceStoreConfig.AddSubscription(...)on the config +IComplianceStoreRegistrar— both products register subscriptions through their own options object, so this follows the existingAddProjectionpattern exactly.IProjectionDaemonand the shared controller interfaces the fixture already exposes.What each store tests today
DaemonTestssubscription tests (incl.subscription_registrations_through_host,subscribe_from_present)Subscriptions/subscription_tests.csEventSourcingTestssubscription registration testsDaemon/projection_coordinator_disabled_mode_tests.cs(partial)Scope
New
SubscriptionCompliancesuite:Acceptance