KurrentDB with SQL Server
Troolio.KurrentDB.SqlServer coordinates selected KurrentDB routes with SQL Server journals, admission evidence, projection consumption, and pending effect records. Install with dotnet add package Troolio.KurrentDB.SqlServer --version 10.0.8 alongside the matching KurrentDB and SQL Server adapters when this route is chosen.
On this page
Coordination model
A trusted write broker owns operation journal decisions and talks to the KurrentDB append authority. SqlKurrentBrokerOperationJournal records durable operation evidence. TrustedKurrentAdmissionGate uses process and cohort snapshots to decide whether a worker may serve the route. SqlKurrentBrokerSuccessorTakeover supports controlled successor admission after a prior broker exits. KurrentSqlProjectionConsumer applies projection records through an application supplied IKurrentSqlProjectionApply.
KurrentDB and SQL Server do not share a distributed transaction here. A crash between systems is resolved using journals, idempotent retries, and recovery checks. The host must preserve broker identity, journal retention, SQL migrations, KurrentDB access, and a policy for uncertain outcomes. Do not erase pending evidence to force a successor to start.
Review before deployment
Verify that both provider versions are 10.0.8; configure secure credentials and trusted transport; test broker failure at each append/journal boundary; monitor pending journals and projection lag. Read recovery and deployment checklist.
Example: Apply one discovered operation
After configuring a trusted verifier and SQL projection writer, call the consumer from a scheduled worker. It returns an operation ID when one ready batch was applied.
public static Task<Guid?> ApplyCombined(KurrentSqlProjectionConsumer consumer,
CancellationToken cancellationToken) =>
consumer.ApplyPendingOnceAsync(cancellationToken: cancellationToken);