Tolitech.Infrastructure.Messaging
1.0.0-preview.4
dotnet add package Tolitech.Infrastructure.Messaging --version 1.0.0-preview.4
NuGet\Install-Package Tolitech.Infrastructure.Messaging -Version 1.0.0-preview.4
<PackageReference Include="Tolitech.Infrastructure.Messaging" Version="1.0.0-preview.4" />
<PackageVersion Include="Tolitech.Infrastructure.Messaging" Version="1.0.0-preview.4" />
<PackageReference Include="Tolitech.Infrastructure.Messaging" />
paket add Tolitech.Infrastructure.Messaging --version 1.0.0-preview.4
#r "nuget: Tolitech.Infrastructure.Messaging, 1.0.0-preview.4"
#:package Tolitech.Infrastructure.Messaging@1.0.0-preview.4
#addin nuget:?package=Tolitech.Infrastructure.Messaging&version=1.0.0-preview.4&prerelease
#tool nuget:?package=Tolitech.Infrastructure.Messaging&version=1.0.0-preview.4&prerelease
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 | 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. |
-
net9.0
- Tolitech.Application.Messaging (>= 1.0.0-preview.3)
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 |
|---|