Raduz.KafkaClient.Client
3.0.0
See the version list below for details.
dotnet add package Raduz.KafkaClient.Client --version 3.0.0
NuGet\Install-Package Raduz.KafkaClient.Client -Version 3.0.0
<PackageReference Include="Raduz.KafkaClient.Client" Version="3.0.0" />
paket add Raduz.KafkaClient.Client --version 3.0.0
#r "nuget: Raduz.KafkaClient.Client, 3.0.0"
// Install Raduz.KafkaClient.Client as a Cake Addin #addin nuget:?package=Raduz.KafkaClient.Client&version=3.0.0 // Install Raduz.KafkaClient.Client as a Cake Tool #tool nuget:?package=Raduz.KafkaClient.Client&version=3.0.0
| _ \ / \ | _ | | | |__ / | |/ /__ _ / | | ____ _ / | () ___ _ __ | |
| |) | / _ \ | | | | | | | / / | ' // | |_| |/ / _
| | | | |/ _ \ ' | __|
| _ < / ___ | || | || |/ / | . \ (| | | < (| | || | | / | | | |
|| _// __/ ___//()|__,|| ||__,|_|||___|| ||__|
How to use:
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
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}") { } }
Implement Exception handlers
For Publisher implement IPublisherExceptionHandler
For Consumer implement IConsumerExceptionHandler
Enjoy easily used package 😃
Product | Versions 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. |
-
net6.0
- Raduz.KafkaClient.Consumer (>= 3.0.0)
- Raduz.KafkaClient.Contracts (>= 3.0.0)
- Raduz.KafkaClient.Publisher (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.