All Projects → Farfetch → Kafka Flow

Farfetch / Kafka Flow

Licence: mit
KafkaFlow is a .NET framework to consume and produce Kafka messages with multi-threading support. It's very simple to use and very extendable. You just need to install, configure, start/stop the bus with your app and create a middleware/handler to process the messages.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Kafka Flow

Brighter
Command Dispatcher, Processor, and Distributed Task Queue
Stars: ✭ 1,393 (+1080.51%)
Mutual labels:  kafka, nuget, dotnet-core
Zerocode
A community-developed, free, open source, microservices API automation and load testing framework built using JUnit core runners for Http REST, SOAP, Security, Database, Kafka and much more. Zerocode Open Source enables you to create, change, orchestrate and maintain your automated test cases declaratively with absolute ease.
Stars: ✭ 482 (+308.47%)
Mutual labels:  consumer, kafka
Nukeeper
Automagically update nuget packages in .NET projects
Stars: ✭ 437 (+270.34%)
Mutual labels:  nuget, dotnet-core
Aidp
weiboAd Infrastructure Data Processor : kafka consumer embedded Lua scripting language in data process framework
Stars: ✭ 20 (-83.05%)
Mutual labels:  consumer, kafka
Tusdotnet
.NET server implementation of the Tus protocol for resumable file uploads. Read more at https://tus.io
Stars: ✭ 298 (+152.54%)
Mutual labels:  nuget, dotnet-core
Kafka Go
Kafka library in Go
Stars: ✭ 4,200 (+3459.32%)
Mutual labels:  consumer, kafka
Weixinmpsdk
微信全平台 SDK Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 6.0。已支持微信公众号、小程序、小游戏、企业号、企业微信、开放平台、微信支付、JSSDK、微信周边等全平台。 WeChat SDK for C#.
Stars: ✭ 7,098 (+5915.25%)
Mutual labels:  nuget, dotnet-core
Node Sinek
🎩 Most advanced high level Node.js Kafka client
Stars: ✭ 262 (+122.03%)
Mutual labels:  consumer, kafka
Anotherkafkamonitor Akm
Another app which used to monitor the progress of Kafka Producer and Consumer
Stars: ✭ 36 (-69.49%)
Mutual labels:  consumer, kafka
Computesharp
A .NET 5 library to run C# code in parallel on the GPU through DX12 and dynamically generated HLSL compute shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
Stars: ✭ 982 (+732.2%)
Mutual labels:  nuget, dotnet-core
Dotnet Tools
A list of tools to extend the .NET Core command line (dotnet)
Stars: ✭ 1,551 (+1214.41%)
Mutual labels:  nuget, dotnet-core
Serilog.exceptions
Log exception details and custom properties that are not output in Exception.ToString().
Stars: ✭ 282 (+138.98%)
Mutual labels:  nuget, dotnet-core
Kminion
KMinion is a feature-rich Prometheus exporter for Apache Kafka written in Go. It is lightweight and highly configurable so that it will meet your requirements.
Stars: ✭ 274 (+132.2%)
Mutual labels:  consumer, kafka
Framework
.NET Core Extensions and Helper NuGet packages.
Stars: ✭ 399 (+238.14%)
Mutual labels:  nuget, dotnet-core
Qbusbridge
The Apache Kafka Client SDK
Stars: ✭ 272 (+130.51%)
Mutual labels:  consumer, kafka
Librdkafka
The Apache Kafka C/C++ library
Stars: ✭ 5,617 (+4660.17%)
Mutual labels:  consumer, kafka
codeigniter-queue-worker
CodeIgniter 3 Daemon Queue Worker (Consumer) Management Controller
Stars: ✭ 67 (-43.22%)
Mutual labels:  workers, consumer
Unitynuget
Provides a service to install NuGet packages into a Unity project via the Unity Package Manager
Stars: ✭ 257 (+117.8%)
Mutual labels:  nuget, dotnet-core
Sarama Cluster
Cluster extensions for Sarama, the Go client library for Apache Kafka 0.9 [DEPRECATED]
Stars: ✭ 969 (+721.19%)
Mutual labels:  consumer, kafka
Yii2 Rabbitmq
RabbitMQ Extension for Yii2
Stars: ✭ 52 (-55.93%)
Mutual labels:  workers, consumer

Build Master Codacy Badge

KafkaFlow

KafkaFlow is a .NET framework to consume and produce Kafka messages with multi-threading support. It's very simple to use and very extendable. You just need to install, configure, start/stop the bus with your app and create a middleware/handler to process the messages.

KafkaFlow uses Confluent Kafka Client.

Packages

Package NuGet Stable Downloads
KafkaFlow KafkaFlow KafkaFlow
KafkaFlow.Abstractions KafkaFlow.Abstractions KafkaFlow
KafkaFlow.Serializer KafkaFlow.Serializer KafkaFlow.Serializer
KafkaFlow.Serializer.ProtoBuf KafkaFlow.Serializer.ProtoBuf KafkaFlow.Serializer.ProtoBuf
KafkaFlow.Serializer.Json KafkaFlow.Serializer.Json KafkaFlow.Serializer.Json
KafkaFlow.Serializer.NewtonsoftJson KafkaFlow.Serializer.NewtonsoftJson KafkaFlow.Serializer.NewtonsoftJson
KafkaFlow.Compressor KafkaFlow.Compressor KafkaFlow.Compressor
KafkaFlow.Compressor.Gzip KafkaFlow.Compressor.Gzip KafkaFlow.Compressor.Gzip
KafkaFlow.TypedHandler KafkaFlow.TypedHandler KafkaFlow.TypedHandler
KafkaFlow.Microsoft.DependencyInjection KafkaFlow.Microsoft.DependencyInjection KafkaFlow.Microsoft.DependencyInjection
KafkaFlow.Unity KafkaFlow.Unity KafkaFlow.Unity
KafkaFlow.LogHandler.Console KafkaFlow.LogHandler.Console KafkaFlow.LogHandler.Console
KafkaFlow.Admin KafkaFlow.Admin KafkaFlow.Admin
KafkaFlow.Admin.WebApi KafkaFlow.Admin.WebApi KafkaFlow.Admin.WebApi

Features

  • Multi-threaded consumer with message order guarantee
  • Middleware support implementing IMessageMiddleware interface
  • Native support for topics with many message types
  • Multiple topics in the same consumer
  • Serializer middleware (ProtoBuf, Json, and NewtonsoftJson or implementing IMessageSerializer interface)
  • Compressor middleware (Gzip or implementing IMessageCompressor interface)
  • Graceful shutdown (wait to finish processing to shutdown)
  • Store offset when processing ends, avoiding message loss
  • Supports .NET Core and .NET Framework
  • Can be used with any dependency injection framework (see here)
  • Fluent configuration
  • Web API and Kafka commands to support administration operations

Usage

.NET Core

Install KafkaFlow.Microsoft.DependencyInjection package

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddKafka(kafka => kafka
            // Install KafkaFlow.LogHandler.Console or implement ILogHandler interface
            .UseConsoleLog() 
            .AddCluster(cluster => cluster
                .WithBrokers(new[] { "localhost:9092" })
				// Install KafkaFlow.Admin
				.EnableAdminMessages("kafka-flow.admin")
                .AddConsumer(consumer => consumer
                    .Topic("test-topic")
                    .WithGroupId("print-console-handler")
                    .WithBufferSize(100)
                    .WithWorkersCount(10)
                    .WithAutoOffsetReset(AutoOffsetReset.Latest)
                    .AddMiddlewares(middlewares => middlewares
                        // Install KafkaFlow.Compressor and Install KafkaFlow.Compressor.Gzip
                        .AddCompressor<GzipMessageCompressor>() 
                        // Install KafkaFlow.Serializer and Install KafkaFlow.Serializer.Protobuf
                        .AddSerializer<ProtobufMessageSerializer>()
                        // Install KafkaFlow.TypedHandler
                        .AddTypedHandlers(handlers => handlers
                            .WithHandlerLifetime(InstanceLifetime.Singleton)
                            .AddHandler<PrintConsoleHandler>())
                    )
                )
                .AddProducer("producer-name", producer => producer
                    .DefaultTopic("test-topic")
                    .AddMiddlewares(middlewares => middlewares
                        .AddSerializer<ProtobufMessageSerializer>()
                        .AddCompressor<GzipMessageCompressor>()
                    )
                )
            )
        );
    }

    public void Configure(
        IApplicationBuilder app,
        IHostApplicationLifetime lifetime,
        IServiceProvider serviceProvider)
    {
        var bus = serviceProvider.CreateKafkaBus();

        // Starts and stops the bus when you app starts and stops to graceful shutdown
        lifetime.ApplicationStarted.Register(
            a => bus.StartAsync(lifetime.ApplicationStopped).GetAwaiter().GetResult(),
            null);
    }
}

See the samples folder for more usages

Documentation

Wiki Page

Contributing

  1. Fork this repository
  2. Follow project guidelines
  3. Do your stuff
  4. Open a pull request following conventional commits

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

Maintainers

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].