Open Source · .NET · v3.1.2

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#.

0K+
Events/sec
<0ms
Latency
0%
Open Source
Source
Kafka
Transform
.Map .Filter .Aggregate
Sink
Database
● running12,480 events/sec<10ms p99
Why Cortex
01

Stream processing, simplified.

A fluent API that reads like a sentence. Source → map → filter → aggregate → sink. Zero boilerplate, idiomatic C#, and the full expressive power of .NET.
State management
02

State, the way you need it.

In-memory for speed, persistent for durability. Plug in RocksDB, PostgreSQL, MongoDB, Cassandra, ClickHouse, SQL Server, SQLite, or DuckDB. Stateful aggregations and windowing work the same regardless of store.
CDC
03

Change data capture, built in.

Stream row-level changes from MongoDB, PostgreSQL, and MS SQL Server the moment they happen. No polling. No glue code. No lost events.
Production ready
04

Observable. Resilient. Scalable.

First-class OpenTelemetry integration, graceful error handling for poison messages, and horizontal workload distribution across instances. Built for real production systems.
Code Example

Build pipelines with a fluent API.

Create powerful streaming pipelines in just a few lines of expressive C# code.

PageViewCounter.cs
// 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();
Capabilities

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.

Integrations

Works with the tools you already use.

Kafka
Pulsar
RabbitMQ
AWS SQS
Azure Service Bus
Elasticsearch
Amazon S3
Azure Blob Storage
HTTP
Files
RocksDB
PostgreSQL
MongoDB
Cassandra
ClickHouse
SQL Server
SQLite
DuckDB
OpenTelemetry
Kafka
Pulsar
RabbitMQ
AWS SQS
Azure Service Bus
Elasticsearch
Amazon S3
Azure Blob Storage
HTTP
Files
RocksDB
PostgreSQL
MongoDB
Cassandra
ClickHouse
SQL Server
SQLite
DuckDB
OpenTelemetry
Product Family

The Cortex ecosystem.

A modular set of packages designed to work together or independently.

Core

Cortex.Streams

High-performance real-time pipeline builder with a fluent API: map, filter, aggregate, window, join, fan-out.

State

Cortex.States

Pluggable state stores: In-Memory, RocksDB, SQL Server, PostgreSQL, MongoDB, Cassandra, ClickHouse, SQLite, DuckDB.

Mediator

Cortex.Mediator

CQRS-ready mediator with commands, queries, notifications, and pluggable pipeline behaviors.

Observability

Cortex.Telemetry

Metrics and distributed tracing for your pipelines, with a first-class OpenTelemetry provider.

Types

Cortex.Types

Expressive union and intersection types — OneOf, AnyOf, AllOf — with pattern matching for safer data modeling.

AI

Cortex.Vectors

High-performance vector types — Dense, Sparse, and Bit — for AI and similarity workloads.

For developers

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.

Ready to build your next streaming application?

Get started with Cortex today and experience the power of modern .NET stream processing.