Sora.Messaging.Core 0.4.0

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

Sylin.Sora.Messaging.Core

Core messaging abstractions and helpers for Sora: bus configuration, auto-registration, and options binding.

  • Target framework: net9.0
  • License: Apache-2.0

Install

dotnet add package Sylin.Sora.Messaging.Core

Usage

Declare messages with attributes, then send via extension methods.

using Sora.Messaging;

[Message(Alias = "User.Registered", Version = 1)]
public sealed record UserRegistered(
	string UserId,
	[Header("x-tenant")] string Tenant,
	[IdempotencyKey] string EventId,
	[PartitionKey] string Partition,
	[DelaySeconds] int DelaySeconds = 0);

// Single send (DefaultBus)
await new UserRegistered("u-123", "acme", "evt-1", "acme:u-123").Send();

// Send to a specific bus
await new UserRegistered("u-456", "acme", "evt-2", "acme:u-456").SendTo("rabbit");

// Batch send
var batch = new object[]
{
	new UserRegistered("u-789", "acme", "evt-3", "acme:u-789"),
	new UserRegistered("u-790", "acme", "evt-4", "acme:u-790")
};
await batch.Send();           // default bus
await batch.SendTo("rabbit"); // specific bus

Register handlers tersely

// Most concise (no envelope):
builder.Services.On<UserRegistered>(msg => Console.WriteLine($"New user: {msg.UserId}"));

// Async with CancellationToken
builder.Services.On<UserRegistered>((msg, ct) => HandleAsync(msg, ct));

// Keep envelope when needed
builder.Services.OnMessage<UserRegistered>((env, msg, ct) => HandleWithEnvelope(env, msg, ct));

// Intent-signaling aliases
builder.Services.OnEvent<UserRegistered>(msg => IndexUser(msg.UserId));
builder.Services.OnCommand<ReindexAll>(ct => ReindexAsync(ct));

Notes

  • Send/SendTo are defined on MessagingExtensions and operate per-message when batching.
  • Headers/correlation/idempotency are promoted from attributes; partitions add a .p{n} suffix to routing keys.
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 (4)

Showing the top 4 NuGet packages that depend on Sora.Messaging.Core:

Package Downloads
Sora.Messaging.RabbitMq

RabbitMQ transport for Sora Messaging: resilient connection management, config-first options, and inbox integration.

Sora.Messaging.Inbox.Http

HTTP-based inbox store for Sora Messaging: simple and configurable receiver endpoint.

Sora.Messaging.Inbox.InMemory

In-memory inbox store for Sora Messaging: fast local development/testing inbox implementation.

Sora.Flow.Core

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 40 9/5/2025
0.2.20 74 8/22/2025
0.2.18 130 8/20/2025
0.2.17 129 8/19/2025
0.2.16 130 8/18/2025