FlinkDotnet 1.0.1

dotnet add package FlinkDotnet --version 1.0.1
                    
NuGet\Install-Package FlinkDotnet -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlinkDotnet" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlinkDotnet" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="FlinkDotnet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FlinkDotnet --version 1.0.1
                    
#r "nuget: FlinkDotnet, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FlinkDotnet@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FlinkDotnet&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=FlinkDotnet&version=1.0.1
                    
Install as a Cake Tool

FlinkDotNet

FlinkDotNet is a .NET framework that enables developers to write Apache Flink 2.1 streaming jobs in C# and submit them to production Flink clusters. This repo also provides a comprehensive distributed message-oriented architecture that enables developers to build production-grade stream processing applications using Apache Flink 2.1, Apache Kafka, Temporal workflows, and Microsoft Aspire orchestration - all accessible through a native .NET SDK.

Build LocalTesting Integration Tests Day01 Integration Tests Observability Integration Tests

Quality Gate Status Coverage Security Rating Maintainability Rating Reliability Rating Duplicated Lines (%) Vulnerabilities Bugs Code Smells Technical Debt Lines of Code

.NET 9.0 Apache Flink 2.1 Apache Kafka Temporal Microsoft Aspire

The Problems You'll Face as Your Application Grows

Stage What Works Problems You'll Hit Why Simple Solutions Break
Starting Out Single server + database Everything runs on one machine Works great for small apps!
Growing Fast Need to handle more users Server crashes under heavy load One machine can't handle thousands of users at once
Data gets lost when server restarts No backup - if server dies, everything is gone
Slow response times Processing requests one by one is too slow
Going Big Need multiple servers How do servers talk to each other? Direct connections become a tangled mess
Messages get lost between servers Network failures mean data disappears
Can't track long-running processes If a process takes hours, how do you monitor it?
Need to process data in real-time Batch processing is too slow for live data
Enterprise Scale Millions of users globally Coordinating across data centers Hundreds of servers need to work together seamlessly
Handling 1 million+ connections per second Need smart routing and load balancing
Data must survive server failures Redundancy and durability become critical
Complex retry logic needed Failures happen - need automatic recovery

FlinkDotNet brings billion-scale architecture to .NET developers - combining these three technologies to handle routing billions of messages per second across distributed systems, processing them in real-time with global context awareness, and coordinating millions of complex workflows simultaneously.

What is FlinkDotNet?

FlinkDotNet lets you write Apache Flink 2.1 streaming jobs in C# and submit them to Flink clusters. No Java required. A complete distributed message-oriented architecture for building enterprise stream processing applications in .NET, it combines:

  • Apache Flink 2.1 - distributed stream processing engine with state management.
  • Apache Kafka - Distributed message streaming/queue
  • Temporal - Durable workflow orchestration/Durable execution solution.
  • Microsoft Aspire - Local development containerised orchestration.
  • FlinkDotNet SDK - Native .NET API for writing Flink jobs in C#
var env = Flink.GetExecutionEnvironment();
var stream = env.FromKafka("orders")
    .Filter(order => order.Amount > 100)
    .Map(order => order.ToUpperCase())
    .SinkToKafka("processed-orders");

await env.ExecuteAsync("order-processor");

Distributed Architecture with Aspire Orchestration

.NET Aspire orchestrates the complete distributed message-oriented architecture locally, providing production-parity development environments.

Full Architecture Stack

Stream Processing Layer:

  • Apache Flink 2.1 - JobManager, TaskManager, and SQL Gateway for real-time stream processing
  • FlinkDotNet SDK - Native .NET DataStream API with fluent C# DSL
  • Job Gateway - ASP.NET Core service for job submission and management

Messaging & Orchestration Layer:

  • Apache Kafka - KRaft-mode message broker with JMX metrics export
  • Temporal - Durable workflow orchestration with PostgreSQL backend

Observability Stack (LearningCourse mode):

  • Prometheus - Metrics collection from Flink, Kafka, and custom applications
  • Grafana - Visualization dashboards for performance monitoring
  • JMX Exporters - Metrics bridge for Java components

With one command, Aspire starts all containers, configures service discovery, and provides a unified dashboard - enabling you to develop and test complete distributed streaming applications locally.

Component Roles in High-Throughput Processing

When processing millions of messages per second, each component plays a critical role:

Apache Kafka - Message ingestion and buffering

  • Handles message ingestion at scale (millions of messages/second)
  • Provides durable message storage with partitioning for parallel consumption
  • Acts as buffer between producers and stream processors
  • Enables replay and reprocessing of historical data

Apache Flink 2.1 - Distributed stream processing engine

  • Processes messages in parallel across multiple TaskManager instances
  • Provides stateful computations with exactly-once processing guarantees
  • Scales horizontally by adding more TaskManager slots
  • Handles backpressure to prevent system overload

FlinkDotNet SDK - .NET development interface

  • Enables writing stream processing logic in C# with type safety
  • Compiles to Flink's native execution model
  • Provides fluent API for common streaming patterns (map, filter, window, join)
  • Eliminates need for Java expertise while maintaining full Flink performance

Temporal - Durable workflow orchestration

  • Manages long-running workflows across distributed job submissions
  • Provides guaranteed execution with automatic retries and compensation
  • Maintains workflow state even during infrastructure failures
  • Coordinates complex multi-step processing pipelines

Microsoft Aspire - Local development orchestration

  • Simulates production environment locally with container orchestration
  • Manages service discovery between Kafka, Flink, Temporal, and custom services
  • Provides unified dashboard for monitoring all components
  • Enables rapid iteration and testing before production deployment

Together, these components form a production-grade streaming architecture capable of processing high-volume event streams with reliability and fault tolerance.

Try It Out

# Prerequisites: .NET 9.0 SDK, Docker Desktop (or Podman)

# 1. Clone and run LocalTesting
git clone https://github.com/devstress/FlinkDotnet.git
cd FlinkDotnet/LocalTesting
dotnet run --project LocalTesting.FlinkSqlAppHost

# 2. Aspire Dashboard opens at http://localhost:15888
# 3. Navigate to LearningCourse folder and follow the instructions there
# Or run integration tests to validate everything works
dotnet test LocalTesting.IntegrationTests

LocalTesting includes integration tests that validate the complete pipeline: Kafka → Flink → Processing → Output.

FlinkDotNet provides 100% feature parity with Apache Flink 1.0-2.1, implementing all major features across every version release.

Version-by-Version Coverage

Flink Version Release Date Coverage Key Features Implemented
1.0-1.9 2016-2019 100% DataStream API, Windows, State Management, CEP, Kafka Integration
1.10 Feb 2020 100% Table API, SQL Gateway, Catalog API
1.11 Jul 2020 100% DDL Support, Change Data Capture
1.12 Dec 2020 100% Unified Source API/FLIP-27, SQL Connectors
1.13 May 2021 100% SQL Functions, Window TVF
1.14 Nov 2021 100% SQL Client, Batch SQL
1.15-1.18 2022-2023 100% Table Store/Apache Paimon, Advanced Table Features
1.19 Mar 2024 100% Performance Improvements, Checkpoint Optimizations
1.20 Oct 2024 100% Unified Sink v2 (WI6), Materialized Tables
2.0 Mar 2025 100% Disaggregated State Management, Unified Batch/Stream, API Overhaul
2.1 Jul 2025 100% AI/ML Integration, VARIANT Type, PTFs, Performance & Format

Feature Categories (21/21 Complete - 100% 🎉)

P0 Features (Critical - ALL COMPLETE):

  • Unified Sink API v2 (WI6, Flink 1.20) - Modern sink pattern replacing SinkFunction
  • Materialized Tables (WI7, Flink 1.20) - Declarative ETL with auto-refresh
  • AI/ML Integration (WI8-WI9, Flink 2.1) - CREATE MODEL, ML_PREDICT, AI providers (OpenAI, Azure OpenAI, Amazon Bedrock, Google Vertex AI, Hugging Face)

P1 Features (High Priority - ALL COMPLETE):

  • VARIANT Data Type (WI10, Flink 2.1) - Semi-structured JSON data handling
  • Table API & Advanced SQL (WI10, Flink 2.1) - All 7 sub-features complete
  • Process Table Functions (PTFs) (WI10, Flink 2.1) - Advanced table processing
  • Apache Paimon (WI13, Flink 1.15-1.18) - Lakehouse storage integration
  • Observability Testing (WI11) - Comprehensive test coverage and monitoring
  • Catalog API (WI14, Flink 1.10) - Hive/JDBC/GenericInMemory catalog management
  • Unified Source API (WI15, Flink 1.12) - FLIP-27 modern source connector framework

P2 Features (Medium Priority - ALL COMPLETE):

  • Performance & Format (WI12, WI16, Flink 2.1) - All 4 sub-features complete:
    • ✅ Custom Async Sink Batching (WI12)
    • ✅ State Backend Configuration (WI16)
    • ✅ Smile Format for Compiled Plans (WI16)
    • ✅ MultiJoin Optimization (WI16)

Learn FlinkDotNet

LearningCourse provides a 15-day hands-on course covering:

  • Day 01: Kafka-Flink Data Pipeline
  • Day 02: Flink 2.1 Fundamentals - Complete Apache Flink 1.0-2.1 Version Coverage
  • Day 03-15: Advanced topics (AI integration, backpressure, observability, workflows, stress testing, and more)

Each day includes working examples and integration tests you can run locally.

Documentation

Installation

NuGet Package

dotnet add package FlinkDotNet

Docker Image

docker pull devstress/flinkdotnet:latest
docker run -p 8086:8086 \
  -e FLINK_CLUSTER_HOST=your-flink-host \
  -e FLINK_CLUSTER_PORT=8081 \
  devstress/flinkdotnet:latest

Standalone Executables

Download from GitHub Releases - includes Windows and Linux packages.

Requirements

  • .NET 9.0 SDK - For development
  • Docker Desktop or Podman - For local testing with Aspire
  • Apache Flink 2.1 cluster - For production deployments

Community & Support

License

MIT License - see LICENSE for details.


Get Started: Try the LocalTesting environment or explore the 15-Day Learning Course.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 317 11/5/2025
1.0.0 263 10/28/2025