Welcome to Streamiz.Kafka.Net πŸš€οƒ

_images/logo-kafka-stream-net.png

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 !

Need help

@LGouellec