Modulytics.SharedKernel.EventBus.Kafka
1.0.61
dotnet add package Modulytics.SharedKernel.EventBus.Kafka --version 1.0.61
NuGet\Install-Package Modulytics.SharedKernel.EventBus.Kafka -Version 1.0.61
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="Modulytics.SharedKernel.EventBus.Kafka" Version="1.0.61" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Modulytics.SharedKernel.EventBus.Kafka" Version="1.0.61" />
<PackageReference Include="Modulytics.SharedKernel.EventBus.Kafka" />
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 Modulytics.SharedKernel.EventBus.Kafka --version 1.0.61
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Modulytics.SharedKernel.EventBus.Kafka, 1.0.61"
#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.
#:package Modulytics.SharedKernel.EventBus.Kafka@1.0.61
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Modulytics.SharedKernel.EventBus.Kafka&version=1.0.61
#tool nuget:?package=Modulytics.SharedKernel.EventBus.Kafka&version=1.0.61
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Modulytics.SharedKernel.EventBus.Kafka
Topic-first Kafka EventBus layer for SharedKernel. Produces and consumes protobuf messages, with
topics declared centrally in ITopicConfiguration implementations rather than on individual mappers.
Registration
// Register all topic configurations from the given assemblies.
// Wires up mappers, TopicBinding singletons, and hosted TopicSubscriber services.
services.AddKafkaTopics(typeof(MyTopicConfiguration).Assembly);
// Optional: provision owned (produced) topics at start-up via the Kafka admin API.
// Only call from the service that owns the topics.
services.AddKafkaTopicProvisioning();
Configuration
Bind from appsettings.json under the Kafka section:
{
"Kafka": {
"BootstrapServers": "localhost:9092",
"ClientId": "my-service",
"Producer": { "Acks": "All", "CompressionType": "snappy" },
"Consumer": { "GroupId": "my-service", "AutoOffsetReset": "Earliest" },
"Topic": { "Partitions": 3, "ReplicationFactor": 1 }
}
}
Omit the Topic section to skip topic provisioning.
Declaring topics
public class MyTopicConfiguration : ITopicConfiguration
{
public void AddTopics(ITopicRegistrationConfigurator cfg)
{
// Consume with a dedicated mapper class:
cfg.AddConsumer<OrderProto, OrderCreatedEvent, OrderProtoMapper>("orders.created");
// Consume with an inline lambda:
cfg.AddConsumer<PaymentProto, PaymentReceivedEvent>("payments.received",
proto => new PaymentReceivedEvent(proto.Id, proto.Amount));
// Produce with a dedicated mapper class:
cfg.AddProducer<ShipmentDispatchedEvent, ShipmentProto, ShipmentProtoMapper>("shipments.dispatched");
// Produce with an inline lambda:
cfg.AddProducer<InvoiceIssuedEvent, InvoiceProto>("invoices.issued",
ev => new InvoiceProto { Id = ev.Id.ToString() });
}
}
Forwarding (producing)
IntegrationEventForwarder<TEvent, TProto> is a MassTransit IConsumer. Register it on your
module's consumer configuration so it is picked up by the MassTransit bus:
cfg.AddConsumer<IntegrationEventForwarder<ShipmentDispatchedEvent, ShipmentProto>>();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Confluent.Kafka (>= 2.6.1)
- Google.Protobuf (>= 3.33.5)
- MassTransit (>= 8.1.3)
- Modulytics.SharedKernel.Application (>= 1.0.61)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.61 | 39 | 6/5/2026 |