Raduz.KafkaClient.Contracts 4.0.2

dotnet add package Raduz.KafkaClient.Contracts --version 4.0.2
                    
NuGet\Install-Package Raduz.KafkaClient.Contracts -Version 4.0.2
                    
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="Raduz.KafkaClient.Contracts" Version="4.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Raduz.KafkaClient.Contracts" Version="4.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Raduz.KafkaClient.Contracts" />
                    
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 Raduz.KafkaClient.Contracts --version 4.0.2
                    
#r "nuget: Raduz.KafkaClient.Contracts, 4.0.2"
                    
#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.
#addin nuget:?package=Raduz.KafkaClient.Contracts&version=4.0.2
                    
Install Raduz.KafkaClient.Contracts as a Cake Addin
#tool nuget:?package=Raduz.KafkaClient.Contracts&version=4.0.2
                    
Install Raduz.KafkaClient.Contracts as a Cake Tool

| _ \ / \ | _ | | | |__ / | |/ /__ _ / | | ____ _ / | () ___ _ __ | | / | _ __ | | _ __ __ _ __| | ___ | |) | / _ \ | | | | | | | / / | ' // | |_| |/ / _ | | | | |/ _ \ ' | || | / _ | ' | | '/ ` |/ __| __/ __| | _ < / ___ | || | || |/ /_ | . \ (| | | < (| | || | | _/ | | | | | || () | | | | || | | (| | (| |_
|| _// __
/ ___//()|__,|| ||__,|_|||_|| ||_()_____/|| ||_|| _,|_|_|/

THIS PACKAGE IS ONLY ABSTRACTIONS.. IT WON'T WORK WITHOUT Raduz.KafkaClient.Client, Raduz.KafkaClient.Consumer or Raduz.KafkaClient.Publisher

How to use:

  1. Add settings to your appsettings.json: KafkaClientConsumerConfig - inherits from https://docs.confluent.io/platform/current/clients/confluent-kafka-dotnet/_site/api/Confluent.Kafka.ConsumerConfig.html + MaxConsumeRetryCount count of retries (retry pattern)

    KafkaClientProducerConfig - inherits from https://docs.confluent.io/platform/current/clients/confluent-kafka-dotnet/_site/api/Confluent.Kafka.ProducerConfig.html + AllowCreateTopic - create topic, if there is non while publishing

    SchemaRegistryConfig https://docs.confluent.io/platform/current/clients/confluent-kafka-dotnet/_site/api/Confluent.SchemaRegistry.SchemaRegistryConfig.html

  2. Register ConfigureKafkaConsumer and ConfigureKafkaPublisher to services container

    Publisher is used like:

    var publisher = app.Services.GetService<IKafkaPublisher>()!; // or some other way to obtain await publisher.PublishAsync("{TOPIC-NAME}", "{SOME-KEY}", {YOUR-AVRO-OBJECT}, cancellationToken);

    For Consumers create handlers for each topic like:

    public class YourRequest : KafkaConsumerHandler<{YOUR-AVRO-OBJECT}> { public YourRequest() : base("{TOPIC-NAME}") { } }

    In base class is injected IConsumerManager which is singleton managing pause/resume actions for soncumer, so if there is error with your DB f.e. you can pause consuming of all topics

  3. Implement Exception handlers

    For Publisher implement IPublisherExceptionHandler

    For Consumer implement IConsumerExceptionHandler

  4. Enjoy easily used package 😃

Issues or feature requests report here, please https://github.com/Rades98/Raduz.KafkaClient/issues

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Raduz.KafkaClient.Contracts:

Package Downloads
Raduz.KafkaClient.Consumer

Package Description

Raduz.KafkaClient.Publisher

Package Description

Raduz.KafkaClient.Client

Easy to use Kafka client using AVRO schema

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.2 592 11/4/2022
4.0.1 579 11/1/2022
4.0.0 660 10/31/2022
3.0.0 756 10/31/2022 3.0.0 is deprecated because it has critical bugs.
2.0.2 1,041 10/30/2022 2.0.2 is deprecated.
2.0.1 794 10/24/2022 2.0.1 is deprecated.
2.0.0 805 10/24/2022 2.0.0 is deprecated.
1.0.0 945 10/23/2022 1.0.0 is deprecated.