Raycynix.Extensions.Messaging.Abstractions 1.0.0

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

Raycynix.Extensions.Messaging.Abstractions

Raycynix.Extensions.Messaging.Abstractions contains the transport-neutral contracts used by Raycynix messaging packages.

What it contains

  • MessageFormat
  • MessageContentTypes
  • MessageEnvelope<TMessage>
  • SerializedMessage
  • IMessageCodec
  • IMessageCodecResolver
  • IMessageEnvelopeFactory
  • IMessagePublisher
  • IMessageHandler<TMessage>
  • IRequestClient
  • IRequestEnvelopeFactory
  • RequestEnvelope<TRequest>
  • ResponseEnvelope<TResponse>
  • transport-neutral contracts for publishers, handlers, codecs, and envelopes

What it does not contain

  • DI registration
  • JSON serializer implementation
  • gRPC serializer implementation
  • Kafka producer implementation
  • RabbitMQ publisher implementation
  • hosted services

Usage

Declare a message contract:

[MessageContract("orders.created", "1.0.0")]
public sealed record OrderCreatedMessage(string OrderId);

Implement a handler contract:

public sealed class OrderCreatedHandler : IMessageHandler<OrderCreatedMessage>
{
    public ValueTask HandleAsync(
        MessageEnvelope<OrderCreatedMessage> envelope,
        CancellationToken cancellationToken = default)
    {
        Console.WriteLine(envelope.Message.OrderId);
        return ValueTask.CompletedTask;
    }
}

Define a direct request contract:

public sealed record GetOrderRequest(string OrderId);

public sealed record GetOrderResponse(string OrderId, string Status);

Use the unified incoming dispatcher contract:

public sealed class IncomingProcessor(IMessageDispatcher dispatcher)
{
    public ValueTask<MessageDispatchResult> ProcessAsync(
        MessageEnvelope<OrderCreatedMessage> envelope,
        CancellationToken cancellationToken)
    {
        return dispatcher.DispatchAsync(envelope, cancellationToken);
    }
}

Implement a custom codec:

public sealed class CustomBinaryCodec : IMessageCodec
{
    public MessageFormat Format => MessageFormat.Grpc;

    public string ContentType => "application/x-custom-binary";

    public bool CanHandle(Type messageType) => messageType == typeof(MyMessage);

    public byte[] Serialize(object message, Type messageType) => ((MyMessage)message).ToByteArray();

    public object Deserialize(ReadOnlyMemory<byte> payload, Type messageType) => MyMessage.Parser.ParseFrom(payload.Span);
}

Implement a custom direct client abstraction:

public sealed class OrdersClient(IRequestClient requestClient)
{
    public async Task<GetOrderResponse> GetAsync(
        RequestEnvelope<GetOrderRequest> request,
        CancellationToken cancellationToken)
    {
        var response = await requestClient.SendAsync<GetOrderRequest, GetOrderResponse>(
            request,
            cancellationToken);

        return response.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 (1)

Showing the top 1 NuGet packages that depend on Raycynix.Extensions.Messaging.Abstractions:

Package Downloads
Raycynix.Extensions.Messaging

Transport-agnostic messaging registration, dispatch, direct requests, observability, scoped envelope factories, and outbox/inbox reliability foundations for Raycynix applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 40 4/8/2026
0.8.0 44 4/8/2026

See the repository changelog and release history for package-specific changes and breaking updates.