The .NET SDK for KurrentDB
Kurrent Surge
Append anything. Process everything.
The .NET SDK for KurrentDB. Append across streams, process what arrives, and evolve your events, without writing the machinery around any of it.
- Many kinds of message per stream, each in its own format
- A hosted runtime that owns the subscription, the checkpoints and the shutdown
- No reflection anywhere. Source generators instead
Install
dotnet add package Kurrent.SurgeWhat it takes
This much. No more.
Produce
One unlock, two streams. Both land, or a bike goes missing.
var builder = Host.CreateApplicationBuilder(args);builder.AddKurrentSurge("kurrentdb");
using var host = builder.Build();var client = host.Services.GetRequiredService<KurrentClient>();
var records = new[] { AppendRecord.Create(new BikeUnlocked("991", "alice"), r => r with { Stream = "bike-991" }), AppendRecord.Create(new RideStarted("alice", "991"), r => r with { Stream = "rider-alice" })};
await client.Streams.AppendRecords(records, default);Consume
A typed handler on the same records. The runtime owns the loop.
var builder = Host.CreateApplicationBuilder(args);
builder.AddKurrentSurge("kurrentdb", surge => surge .AddProcessor<FleetWatch>(opts => opts.Subscription.Filter = RecordFilter.ByCategory("bike")));
await builder.Build().RunAsync();
sealed class FleetWatch : MessageProcessor { public FleetWatch() => Process<BikeUnlocked>((ride, ctx) => ctx.Logger.LogInformation("Bike {Id} is out", ride.BikeId));}No subscription loop, no checkpoint bookkeeping, no reconnect policy. Those are the runtime’s, and it hands them back the moment you ask for them.
What you get
All of this. One package.
KurrentDB stores an ordered log, not a set of queues. Most clients stop at moving bytes across it.
Hosted runtime
Processing, already wired
Write the handler. The runtime owns the subscription, the checkpoints and the shutdown, and gives them back on request.
Nothing to wire. Nothing to remember.
Read the guide →Messages
Serialization you never see
Many kinds of message on one stream, each in its own format. Every record carries the schema that decodes it back into a CLR type.
JSON, Protobuf and Avro. Same stream.
See the schema layer →Atomic writes
One append, many streams
Several streams, one transaction, a revision guard on each. Every one lands, or none does.
No saga. No outbox.
Browse the streams API →Connection
Resilience in the core
Retry on every method, and a real gRPC load balancer that ranks nodes from gossip and follows the leader election underneath it.
Your code never finds out.
See how it routes →Record filters
A WHERE clause, not a prefix
Filter by stream, category, schema, an index, or a field inside the message. Bound parameters, one expression.
One predicate. Both halves.
See the filter syntax →Management
Connectors, indexes and nodes, from code
Start a connector. Build a secondary index. Register a schema. Scavenge a node. All from the client you already opened.
No console. No scripts. No curl.
See what it manages →