KafkaProducerHost 1.0.0
dotnet add package KafkaProducerHost --version 1.0.0
NuGet\Install-Package KafkaProducerHost -Version 1.0.0
<PackageReference Include="KafkaProducerHost" Version="1.0.0" />
<PackageVersion Include="KafkaProducerHost" Version="1.0.0" />
<PackageReference Include="KafkaProducerHost" />
paket add KafkaProducerHost --version 1.0.0
#r "nuget: KafkaProducerHost, 1.0.0"
#addin nuget:?package=KafkaProducerHost&version=1.0.0
#tool nuget:?package=KafkaProducerHost&version=1.0.0
KafkaProducerHost
An SDK built on top of the Confluent Kafka .NET client, providing simplified APIs for producing messages, handling retries, schema serialization, and seamless integration with Kafka brokers.
Features
- Simplified APIs for producing Kafka messages
- Automatic handling of retries
- Schema serialization support
- Seamless integration with Kafka brokers
Getting Started
Prerequisites
- .NET 6.0 or .NET 8.0
Add KafkaProducerConfig
to the appsettings.json file
{
"KafkaProducerConfig": {
"BootstrapServers": "localhost:9092"
}
}
Register the KafkaProducerHost in the service container in your Program.cs
or StartUp.cs
file:
services.Configure<KafkaProducerConfig>(c=>builder.Configuration.GetSection(nameof(KafkaProducerConfig)).Bind(c));
services.AddKafkaProducerHost(builder.Configuration);
Example Usage
Inject the IKafkaProducer
interface into your service and use it to produce messages:
using KafkaProducerHost;
public class MyService
{
private readonly IKafkaProducer _kafkaProducer;
public MyService(IKafkaProducer kafkaProducer)
{
_kafkaProducer = kafkaProducer;
}
public async Task ProduceMessage(string topic, string message)
{
await _kafkaProducer.ProduceAsync(topic, message);
}
}
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 is compatible. 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
- Confluent.Kafka (>= 2.8.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
-
net8.0
- Confluent.Kafka (>= 2.8.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on KafkaProducerHost:
Package | Downloads |
---|---|
KafkaConsumerTemplateV8
A .NET project template for Kafka consumer applications. |
|
KafkaConsumerMongoDbTemplateV8
A .NET project template for quickly setting up Kafka consumer applications. This template simplifies the process of building robust Kafka consumer services with essential configurations and features like message consumption, dependency injection, and graceful shutdown handling. Perfect for developers working with Apache Kafka in .NET. |
|
DotNetApiMongoDbTemplateV8
DotnetApiMongoDbTemplateV8 is a comprehensive, ready-to-use template for building modern .NET APIs with MongoDB. Designed to simplify and accelerate API development, this template integrates essential tools and follows best practices, making it ideal for developers looking for a solid foundation for their projects. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 256 | 3 months ago |
Version 1.0.0 - Initial Release