Uniform.Messaging 1.0.41-preview

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

Uniform.Messaging

Messaging contracts for the Uniform microservice framework — IPublisher, IConsumer<T>, and HandleContext<T>. This package is pulled in automatically as a dependency of Uniform — you only need to reference it directly when building a messaging provider or shared message library.

IPublisher

Inject IPublisher anywhere to send messages:

public class OrderService(IPublisher publisher)
{
    public async Task PlaceOrder(Order order)
    {
        // Fire-and-forget (via transactional outbox — only sends if consumer completes without exception)
        await publisher.Publish(new OrderPlaced(order.Id));

        // Publish immediately, bypassing the outbox
        await publisher.PublishAndWait(new OrderPlaced(order.Id));

        // Request/response
        var result = await publisher.Request<ValidateOrder, ValidationResult>(new ValidateOrder(order));
    }
}

PublishOptions

Value Behaviour
PublishEventually (default) Queued in the outbox; sent after the consumer completes without error
PublishImmediately Sent directly, bypassing the outbox

IConsumer<T>

Implement IConsumer<T> to handle a message. Consumers are discovered automatically by reflection — no registration required.

public class OrderPlacedConsumer(ILogger<OrderPlacedConsumer> log) : IConsumer<OrderPlaced>
{
    public async Task Consume(OrderPlaced message)
    {
        log.LogInformation("Order {OrderId} placed", message.OrderId);
    }
}

IConsumer<TRequest, TResponse>

For request/response patterns:

public class ValidateOrderConsumer : IConsumer<ValidateOrder, ValidationResult>
{
    public async Task<ValidationResult> Consume(ValidateOrder request)
    {
        // validate and return
        return new ValidationResult(IsValid: true);
    }
}

HandleContext<T>

Every inbound message is wrapped in a HandleContext<T> that carries distributed tracing metadata:

public class HandleContext<T>
{
    public HandleContextMetadata Metadata { get; set; }
    public T Payload { get; set; }
}

HandleContextMetadata includes ConversationId, MessageId, OriginService, SendingService, retry info, and correlation IDs for request/response.

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 (9)

Showing the top 5 NuGet packages that depend on Uniform.Messaging:

Package Downloads
Uniform.Messaging.RabbitMq

RabbitMQ messaging provider for the Uniform microservice framework.

Uniform.Web

ASP.NET Core integration module for the Uniform microservice framework.

Uniform.SDK

Host bootstrapping, background services, and consumer discovery for the Uniform microservice framework.

Uniform.Messaging.AzureServiceBus

Azure Service Bus messaging provider for the Uniform microservice framework.

Uniform.Messaging.CloudAmqp

CloudAMQP (managed RabbitMQ) messaging provider for the Uniform microservice framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.41-preview 93 9/11/2026
1.0.40-preview 119 7/21/2026
1.0.39-preview 81 6/28/2026
1.0.38-preview 83 6/26/2026
1.0.37-preview 79 6/6/2026
1.0.36-preview 74 5/25/2026
1.0.35-preview 76 5/18/2026
1.0.34-preview 82 5/10/2026
1.0.33-preview 86 5/9/2026
1.0.32-preview 94 5/8/2026
1.0.31-preview 71 5/8/2026
1.0.30-preview 361 5/8/2026