Franz.Common.Messaging.MassTransit 1.7.7

dotnet add package Franz.Common.Messaging.MassTransit --version 1.7.7
                    
NuGet\Install-Package Franz.Common.Messaging.MassTransit -Version 1.7.7
                    
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="Franz.Common.Messaging.MassTransit" Version="1.7.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Messaging.MassTransit" Version="1.7.7" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Messaging.MassTransit" />
                    
Project file
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 Franz.Common.Messaging.MassTransit --version 1.7.7
                    
#r "nuget: Franz.Common.Messaging.MassTransit, 1.7.7"
                    
#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 Franz.Common.Messaging.MassTransit@1.7.7
                    
#: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=Franz.Common.Messaging.MassTransit&version=1.7.7
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Messaging.MassTransit&version=1.7.7
                    
Install as a Cake Tool

Franz.Common.Messaging.MassTransit

A library within the Franz Framework that integrates MassTransit with messaging workflows. This package simplifies the setup and management of Kafka-based messaging using MassTransit, providing tools for producers, consumers, and client registrations.


Features

  • MassTransit Integration:
    • Extends MassTransit functionality to Kafka-based workflows.
  • Kafka Messaging:
    • Interfaces for Kafka producers (IKafkaProducer) and consumers (IKafkaConsumer).
  • Messaging Client:
    • IMessagingClient for abstracting and managing messaging operations.
  • Service Registration:
    • ServiceRegistration to streamline the setup of Kafka producers and consumers.

Version Information

  • Current Version: 1.7.7
  • Part of the private Franz Framework ecosystem.

Dependencies

This package relies on:

  • MassTransit (8.3.4): Provides in-process messaging and event-driven architecture tools.
  • MassTransit.Kafka (8.3.4): Adds Kafka transport support for MassTransit.

Installation

From Private Azure Feed

Since this package is hosted privately, configure your NuGet client:

dotnet nuget add source "https://your-private-feed-url" \
  --name "AzurePrivateFeed" \
  --username "YourAzureUsername" \
  --password "YourAzurePassword" \
  --store-password-in-clear-text

Install the package:

dotnet add package Franz.Common.Messaging.MassTransit  

Usage

1. Register Kafka Messaging with MassTransit

Use ServiceRegistration to set up Kafka producers and consumers:

using Franz.Common.Messaging.MassTransit.Extensions;

services.AddMassTransitKafkaMessaging(cfg =>
{
    cfg.Host("localhost:9092", h =>
    {
        h.Username = "your-username";
        h.Password = "your-password";
    });
});

2. Implement Kafka Producers and Consumers

Define Kafka producer and consumer interfaces:

using Franz.Common.Messaging.MassTransit.Contracts;

public interface IOrderCreatedProducer : IKafkaProducer<OrderCreatedEvent> { }
public interface IOrderCreatedConsumer : IKafkaConsumer<OrderCreatedEvent> { }

Implement the producer and consumer logic:

using Franz.Common.Messaging.MassTransit.Clients;

public class OrderCreatedProducer : KafkaProducer<OrderCreatedEvent>, IOrderCreatedProducer
{
    public OrderCreatedProducer(IMessagingClient client) : base(client) { }
}

public class OrderCreatedConsumer : KafkaConsumer<OrderCreatedEvent>, IOrderCreatedConsumer
{
    public OrderCreatedConsumer(IMessagingClient client) : base(client) { }
}

3. Use Messaging Clients

Leverage IMessagingClient to abstract messaging operations:

using Franz.Common.Messaging.MassTransit.Clients;

public class MessagingService
{
    private readonly IMessagingClient _messagingClient;

    public MessagingService(IMessagingClient messagingClient)
    {
        _messagingClient = messagingClient;
    }

    public async Task PublishMessageAsync<T>(T message) where T : class
    {
        await _messagingClient.PublishAsync(message);
    }
}

Integration with Franz Framework

The Franz.Common.Messaging.MassTransit package integrates seamlessly with:

  • MassTransit: Enables robust event-driven messaging workflows.
  • MassTransit.Kafka: Adds Kafka transport support for MassTransit.
  • Franz Framework: Extends Kafka messaging capabilities across distributed systems.

Contributing

This package is part of a private framework. Contributions are limited to the internal development team. If you have access, follow these steps:

  1. Clone the repository. @ https://github.com/bestacio89/Franz.Common/
  2. Create a feature branch.
  3. Submit a pull request for review.

License

This library is licensed under the MIT License. See the LICENSE file for more details.


Changelog

Version 1.2.65

  • Added IKafkaProducer and IKafkaConsumer interfaces for Kafka operations.
  • Integrated IMessagingClient for abstracted messaging operations.
  • Provided ServiceRegistration for streamlined Kafka setup with MassTransit.
  • Full compatibility with MassTransit and MassTransit.Kafka.

Version 1.3

  • Upgraded to .NET 9.0.8
  • Added new features and improvements
  • Separated business concepts from mediator concepts
  • Now compatible with both the in-house mediator and MediatR
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

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.7.7 97 1/31/2026
1.7.6 91 1/22/2026
1.7.5 97 1/10/2026
1.7.4 96 12/27/2025
1.7.3 183 12/22/2025
1.7.2 181 12/21/2025
1.7.1 116 12/20/2025
1.7.0 279 12/16/2025
1.6.21 200 11/27/2025
1.6.20 198 11/24/2025
1.6.19 153 10/25/2025
1.6.15 191 10/20/2025
1.6.14 185 10/15/2025
1.6.3 180 10/9/2025
1.6.2 193 10/7/2025
1.5.9 197 9/24/2025
1.5.4 182 9/23/2025
1.5.3 243 9/21/2025
1.5.2 239 9/21/2025
1.5.0 230 9/21/2025
Loading failed