![]() |
VOOZH | about |
dotnet add package Raycynix.Extensions.Messaging.Kafka --version 1.0.1
NuGet\Install-Package Raycynix.Extensions.Messaging.Kafka -Version 1.0.1
<PackageReference Include="Raycynix.Extensions.Messaging.Kafka" Version="1.0.1" />
<PackageVersion Include="Raycynix.Extensions.Messaging.Kafka" Version="1.0.1" />Directory.Packages.props
<PackageReference Include="Raycynix.Extensions.Messaging.Kafka" />Project file
paket add Raycynix.Extensions.Messaging.Kafka --version 1.0.1
#r "nuget: Raycynix.Extensions.Messaging.Kafka, 1.0.1"
#:package Raycynix.Extensions.Messaging.Kafka@1.0.1
#addin nuget:?package=Raycynix.Extensions.Messaging.Kafka&version=1.0.1Install as a Cake Addin
#tool nuget:?package=Raycynix.Extensions.Messaging.Kafka&version=1.0.1Install as a Cake Tool
Raycynix.Extensions.Messaging.Kafka contains the Kafka transport integration for Raycynix messaging.
AddKafka(...)KafkaMessagingConfigurationIMessagePublisherConfluent.KafkaMessageEnvelope<TMessage>.DestinationExample appsettings.json:
{
"KafkaMessagingConfiguration": {
"BootstrapServers": [
"localhost:9092"
],
"ClientId": "orders-service",
"EnableIdempotence": true,
"Acks": "all",
"Consumer": {
"Enabled": true,
"Topics": [
"orders.created"
]
}
}
}
Register the transport:
builder.Services.AddRaycynixMessaging(builder.Configuration)
.AddKafka(builder.Configuration);
Publish to a Kafka topic:
public class OrderPublisher(
IMessageEnvelopeFactory envelopeFactory,
IMessagePublisher messagePublisher)
{
public async Task PublishAsync(string orderId, CancellationToken cancellationToken)
{
var envelope = envelopeFactory.Create(
new OrderCreatedMessage(orderId),
destination: "orders.created",
format: MessageFormat.Json);
await messagePublisher.PublishAsync(envelope, cancellationToken);
}
}
The envelope destination is used as the Kafka topic name, and the package publishes:
message-id, correlation-id, causation-id| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. 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.
See the package-local CHANGELOG.md for the full change history. Override PackageReleaseNotes in the package project file for major release-specific notes.