![]() |
VOOZH | about |
dotnet add package Yottadem.Kafka.Producer.Sdk --version 1.1.1
NuGet\Install-Package Yottadem.Kafka.Producer.Sdk -Version 1.1.1
<PackageReference Include="Yottadem.Kafka.Producer.Sdk" Version="1.1.1" />
<PackageVersion Include="Yottadem.Kafka.Producer.Sdk" Version="1.1.1" />Directory.Packages.props
<PackageReference Include="Yottadem.Kafka.Producer.Sdk" />Project file
paket add Yottadem.Kafka.Producer.Sdk --version 1.1.1
#r "nuget: Yottadem.Kafka.Producer.Sdk, 1.1.1"
#:package Yottadem.Kafka.Producer.Sdk@1.1.1
#addin nuget:?package=Yottadem.Kafka.Producer.Sdk&version=1.1.1Install as a Cake Addin
#tool nuget:?package=Yottadem.Kafka.Producer.Sdk&version=1.1.1Install as a Cake Tool
A lightweight and scalable Kafka Producer SDK for .NET applications developed by Yottadem Tech Solutions.
Yottadem Tech Solutions
Yottadem Tech Solutions
Install the package using NuGet Package Manager:
Install-Package Yottadem.Kafka.Producer.Sdk
Or using the .NET CLI:
dotnet add package Yottadem.Kafka.Producer.Sdk
Add the following configuration to your appsettings.json file:
{
"KafkaProducerConfig": {
"Hosts": [
{
"BootstrapServers": "localhost:9092",
"Alias": "ecommerce-kafka",
"SecurityProtocol": "SASL_SSL",
"SaslMechanism": "PLAIN",
"SaslUsername": "API-Key",
"SaslPassword": "API-Secret"
},
{
"BootstrapServers": "localhost:9092",
"Alias": "general-kafka-2",
"SecurityProtocol": "SASL_SSL",
"SaslMechanism": "PLAIN",
"SaslUsername": "API-Key",
"SaslPassword": "API-Secret"
}
]
}
}
Register the SDK in Program.cs or Startup.cs:
services.AddYottademKafkaProducerSdk(config =>
Configuration.GetSection(nameof(KafkaProducerConfig)).Bind(config));
Inject IKafkaProducerFactory into your service and create a Kafka producer instance.
public class ProduceToKafkaService
{
private readonly IKafkaProducer _producer;
public ProduceToKafkaService(IKafkaProducerFactory producerFactory)
{
_producer = producerFactory.CreateKafkaProducer("general-kafka");
}
public async Task ProduceToKafka(object data)
{
await _producer.ProduceAsync("test.topic", data);
}
}
This project is licensed under the MIT License.
Yottadem Tech Solutions
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.