Open Source .NET Native NuGet

Cortex.Streams

Build high-performance, real-time data pipelines in .NET with a fluent API. Define sources, operators, and sinks—then let Cortex handle the rest.

100K+

Events / sec

<10 ms

Latency

10+

Integrations
// A complete stream in 8 lines
var stream = StreamBuilder<int>
  .CreateNewStream("QuickStart")
  .Stream()
  .Filter(x => x > 0)
  .Map(x => x * 2)
  .Sink(Console.WriteLine)
  .Build();
// Start processing
stream.Start();
How It Works

The Stream Builder Pipeline

Cortex.Streams uses a fluent builder pattern. Create ? Configure ? Operate ? Sink ? Build ? Run.

Create
Configure
Operators
Sink
Build & Run
// 1 — Initialize a StreamBuilder
var builder = StreamBuilder<int>
  .CreateNewStream("Example Stream");
// 2 — Add operators
builder.Stream()
  .Map(x => x * 2)
  .Sink(Console.WriteLine);
// 3 — Build & start
var stream = builder.Build();
stream.Start();
// Emit: 1?2, 2?4, 3?6 …
for (int i = 1; i <= 5; i++)
  stream.Emit(i);

Three Steps to Real-Time

Stream Builders provide a fluent API so you can chain operators, configure telemetry, and manage lifecycle—all in a few lines of C#.

  • Create & Configure
    Initialize a StreamBuilder<T> and optionally attach telemetry.
  • Add Operators
    Chain .Map(), .Filter(), .Aggregate(), windows, and custom operators.
  • Build, Start & Emit
    Call .Build(), Start(), then push data with Emit().
Operators

A Rich Library of Stream Operators

Transform, filter, aggregate, window, fan-out, or write your own custom operators—all composable with the fluent API.

Map

Transform every element flowing through the stream with a projection function.

Filter

Keep only events matching a predicate—drop everything else on the floor.

Aggregate

Accumulate values over time with running counters, sums, averages, or custom aggregations.

Window

Tumbling, Sliding, and Session windows to group events by time or count boundaries.

FanOut & Branch

Split a single stream into multiple parallel branches for divergent processing paths.

Custom Operators

Implement your own operator logic and plug it seamlessly into the pipeline.

Integrations

Connect to Your
Data Ecosystem

Cortex.Streams ships with ready-made source and sink connectors for the most popular message brokers, cloud storage, and databases.

Apache Kafka Apache Pulsar RabbitMQ Amazon SQS Azure Service Bus Azure Blob Storage Amazon S3 Files I/O HTTP Elasticsearch
Stream-Table Joins

Enrich streaming data by joining with lookup tables stored in any state store.

Stream-Stream Joins

Correlate events across two independent streams within configurable time windows.

State Stores

In-Memory, RocksDB, SQL Server, PostgreSQL, SQLite, Clickhouse, MongoDB, Cassandra, DuckDB.

Telemetry

Plug in OpenTelemetry or a custom provider for metrics, traces, and health monitoring.

Lifecycle

Full Control Over Your Streams

Start, stop, and query the status of any stream at runtime. Cortex handles graceful shutdown, in-flight event processing, and resource cleanup automatically.

Start
Stop
GetStatus
// Lifecycle demo
var stream = StreamBuilder<string>
  .CreateNewStream("Lifecycle Stream")
  .Stream()
  .Map(m => $"Processed: {m.ToUpper()}")
  .Sink(Console.WriteLine)
  .Build();
stream.Start();
Console.WriteLine(stream.GetStatus()); // Running
stream.Emit("hello"); // ? Processed: HELLO
stream.Emit("world"); // ? Processed: WORLD
stream.Stop();
Console.WriteLine(stream.GetStatus()); // Stopped
Performance

Built for Speed & Scale

High Throughput

Configurable buffer capacities and concurrency levels let you saturate every CPU core.

Low Latency

Sub-10 ms end-to-end latency for lightweight pipelines—ideal for real-time analytics.

Async Processing

First-class async operators ensure non-blocking execution across your entire pipeline.

Start Streaming Today

Install from NuGet, follow the quick-start guide, and have your first pipeline running in under five minutes.