Atya.Messaging.Abstractions 1.1.0

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

Atya.Messaging.Abstractions

Transport-agnostic messaging contracts for publishers, consumers, subscriptions, and envelopes in Atya services.

NuGet Version Downloads .NET 10.0 License: MIT

Overview

Atya.Messaging.Abstractions defines the small contract layer shared by Atya messaging transports. It models message publishers, consumers, consumer registries, subscriptions, and immutable envelopes without binding applications to a broker, serializer, host, or dependency injection container.

The package intentionally does not implement a transport. Atya.Messaging.InMemory proves these contracts for tests and local development in the same release cycle.

Features

  • Publisher, consumer, and consumer registry interfaces with cancellation-aware ValueTask methods.
  • Immutable message envelopes with message id, optional correlation id, and copied headers.
  • Publish options for transport-neutral metadata.
  • Subscription contracts for removing registered consumers.
  • No broker-client, DI, serialization, or hosting dependency.

Installation

dotnet add package Atya.Messaging.Abstractions
Install-Package Atya.Messaging.Abstractions
<PackageReference Include="Atya.Messaging.Abstractions" Version="<latest-stable>" />

Quick Start

using Atya.Messaging.Abstractions;

var envelope = MessageEnvelope.Create(
    "customer.created",
    new MessagePublishOptions(
        messageId: "message-1",
        correlationId: "correlation-1",
        headers: new Dictionary<string, string>
        {
            ["tenant"] = "acme",
        }));

Console.WriteLine(envelope.MessageId);
Console.WriteLine(envelope.Message);
Console.WriteLine(envelope.CorrelationId);

Feature Tour

Implement a publisher:

using Atya.Messaging.Abstractions;

public sealed class CustomerEventPublisher(IMessagePublisher<string> publisher)
{
    public ValueTask PublishAsync(string message, CancellationToken cancellationToken = default)
    {
        return publisher.PublishAsync(
            message,
            new MessagePublishOptions(correlationId: "request-123"),
            cancellationToken);
    }
}

Implement a consumer:

using Atya.Messaging.Abstractions;

public sealed class CustomerEventConsumer : IMessageConsumer<string>
{
    public ValueTask ConsumeAsync(
        MessageEnvelope<string> envelope,
        CancellationToken cancellationToken = default)
    {
        Console.WriteLine(envelope.Message);
        return ValueTask.CompletedTask;
    }
}

Consumer failure semantics are transport-neutral: a normal return acknowledges handling, while an exception indicates handling failed and the transport may negatively acknowledge or redeliver the message.

Error Codes

This package does not define Result error codes. Invalid programmer input is rejected with standard .NET argument exceptions through Atya.Foundation.Guards.

Why These Dependencies

  • Atya.Foundation.Abstractions keeps this package aligned with the foundation contract layer.
  • Atya.Foundation.Guards provides consistent argument validation for public entry points.
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 (2)

Showing the top 2 NuGet packages that depend on Atya.Messaging.Abstractions:

Package Downloads
Atya.Messaging.Outbox

Transactional outbox store and relay primitives for reliable Atya messaging.

Atya.Messaging.InMemory

In-memory messaging transport for tests, local development, and contract validation in Atya services.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 202 7/12/2026
1.0.0 196 7/12/2026