Tolitech.Infrastructure.Messaging 1.0.0-preview.4

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

Tolitech.Infrastructure.Messaging

A .NET library designed to facilitate the publishing of integration events in a straightforward and efficient manner. It provides a simple abstraction for event publishing, making it easy to integrate messaging into your applications.

Features

  • Asynchronous event publishing
  • Easy integration with different endpoints
  • Type-safe message handling
  • Clean and extensible architecture

Installation

Add the NuGet package to your project:

dotnet add package Tolitech.Infrastructure.Messaging

Getting Started

1. Register the Event Bus

Register the event bus in your dependency injection container:

using Tolitech.Infrastructure.Messaging;

builder.Services.AddScoped<IEventBus, EventBus>();

2. Publish an Integration Event

To publish an event, use the IEventBus interface:

public class MyService
{
    private readonly IEventBus _eventBus;

    public MyService(IEventBus eventBus)
    {
        _eventBus = eventBus;
    }

    public async Task PublishEventAsync(MyIntegrationEvent evt, CancellationToken cancellationToken)
    {
        await _eventBus.PublishAsync(evt, cancellationToken);
    }
}

Where MyIntegrationEvent implements IIntegrationEvent.

Example: Defining an Integration Event

using Tolitech.Application.Messaging;

public class MyIntegrationEvent : IIntegrationEvent
{
    public string Data { get; set; }
}

Advanced Usage

You can use any implementation of IPublishEndpoint (e.g., from MassTransit) to integrate with your preferred message broker.


Tolitech.Infrastructure.Messaging streamlines event-driven communication in .NET applications, promoting decoupled and scalable architectures.

Product 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Tolitech.Infrastructure.Messaging:

Package Downloads
Tolitech.Infrastructure.Messaging.EntityFrameworkCore

This assembly contains the infrastructure for messaging, specifically focusing on Outbox pattern implementation using Entity Framework Core. It includes the necessary configurations and unit tests to ensure proper setup and functionality of Outbox messages within a clean architecture framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.4 432 7/21/2025
1.0.0-preview.3 118 7/3/2025
1.0.0-preview.2 122 7/3/2025
1.0.0-preview.1 112 12/12/2024