Welcome to Streamiz.Kafka.Net πο
Streamiz.Kafka.Net is a .NET stream processing library for Apache Kafka (TM).
Note
The source code is available on Github.
Itβs allowed to develop .NET applications that transform input Kafka topics into output Kafka topics. Itβs a rewriting inspired by Kafka Streams.
Streamiz.Kafka.Net aims to provide the same functionality as Kafka Streams. So you can found documentation here :
Starting from scratchο
Here is the easiest way to create a first sync, from scratch :
Create a .Net Standard 2.0, .NET 5 or .NET 6 compatible project. For more information, please find help here net-standard
Add the nuget package Streamiz.Kafka.Net
Please retrieve your kafka cluster connection information
Add this code
static async Task Main(string[] args)
{
var config = new StreamConfig<StringSerDes, StringSerDes>();
config.ApplicationId = "test-app";
config.BootstrapServers = "localhost:9092";
StreamBuilder builder = new StreamBuilder();
builder.Stream<string, string>("test")
.FilterNot((k, v) => v.Contains("key1"))
.To("test-output");
Topology t = builder.Build();
KafkaStream stream = new KafkaStream(t, config);
Console.CancelKeyPress += (o, e) => {
stream.Dispose();
};
await stream.StartAsync();
}
Youβre done !