Stream processing, reimagined.
A modular SDK for building real-time data pipelines with built-in state management, change data capture, and stream processing — in idiomatic C#.
Stream processing, simplified.
State, the way you need it.
RocksDB, PostgreSQL, MongoDB, Cassandra, ClickHouse, SQL Server, SQLite, or DuckDB. Stateful aggregations and windowing work the same regardless of store.Change data capture, built in.
Observable. Resilient. Scalable.
Build pipelines with a fluent API.
Create powerful streaming pipelines in just a few lines of expressive C# code.
// A real-time page-view counter, fed by Kafka.
var stream = StreamBuilder<ClickEvent>
.CreateNewStream("page-view-counter")
.Stream(new KafkaSourceOperator<ClickEvent>(
bootstrapServers: "localhost:9092",
topic: "page-views"))
.Filter(e => !string.IsNullOrEmpty(e.PageUrl))
.GroupBySilently(e => e.PageUrl, stateStoreName: "by-page")
.AggregateSilently<string, int>(
e => e.PageUrl,
(count, _) => count + 1,
stateStoreName: "page-counts")
.Sink(e => Console.WriteLine($"hit: {e.PageUrl}"))
.Build();
stream.Start();Everything you need to build streaming applications.
Real-Time Data Streaming
Process millions of events per second with a fluent, type-safe API over Kafka, Pulsar, RabbitMQ, AWS SQS, and Azure Service Bus.
Sinks & Connectors
Land results anywhere — Elasticsearch, Amazon S3, Azure Blob Storage, HTTP endpoints, files, or straight back onto a broker.
Multiple State Stores
In-memory and persistent: RocksDB, PostgreSQL, MongoDB, Cassandra, ClickHouse, SQL Server, SQLite, and DuckDB.
Change Data Capture
Stream row-level changes from MongoDB, PostgreSQL, and MS SQL Server as they happen — no polling, no glue code.
Windowing & Aggregations
Tumbling, sliding, and session windows with first-class, stateful aggregate operators.
Telemetry & Monitoring
OpenTelemetry integration, graceful error handling, and production-grade observability out of the box.
Works with the tools you already use.
The Cortex ecosystem.
A modular set of packages designed to work together or independently.
Cortex.Streams
High-performance real-time pipeline builder with a fluent API: map, filter, aggregate, window, join, fan-out.
Cortex.States
Pluggable state stores: In-Memory, RocksDB, SQL Server, PostgreSQL, MongoDB, Cassandra, ClickHouse, SQLite, DuckDB.
Cortex.Mediator
CQRS-ready mediator with commands, queries, notifications, and pluggable pipeline behaviors.
Cortex.Telemetry
Metrics and distributed tracing for your pipelines, with a first-class OpenTelemetry provider.
Cortex.Types
Expressive union and intersection types — OneOf, AnyOf, AllOf — with pattern matching for safer data modeling.
Cortex.Vectors
High-performance vector types — Dense, Sparse, and Bit — for AI and similarity workloads.
Copy-paste your way to production.
A growing cookbook of short, runnable patterns — ingest from Kafka, join two streams, window an aggregate, persist state, fan out to multiple sinks, wire up telemetry. Grab one and go.
var stream = StreamBuilder<int>
.CreateNewStream("squares")
.Stream()
.Map(x => x * x)
.Filter(x => x > 10)
.Sink(Console.WriteLine)
.Build();
stream.Start();
stream.Emit(5); // 25Ready to build your next streaming application?
Get started with Cortex today and experience the power of modern .NET stream processing.