![]() |
VOOZH | about |
dotnet add package Sora.Messaging.Core --version 0.4.0
NuGet\Install-Package Sora.Messaging.Core -Version 0.4.0
<PackageReference Include="Sora.Messaging.Core" Version="0.4.0" />
<PackageVersion Include="Sora.Messaging.Core" Version="0.4.0" />Directory.Packages.props
<PackageReference Include="Sora.Messaging.Core" />Project file
paket add Sora.Messaging.Core --version 0.4.0
#r "nuget: Sora.Messaging.Core, 0.4.0"
#:package Sora.Messaging.Core@0.4.0
#addin nuget:?package=Sora.Messaging.Core&version=0.4.0Install as a Cake Addin
#tool nuget:?package=Sora.Messaging.Core&version=0.4.0Install as a Cake Tool
Core messaging abstractions and helpers for Sora: bus configuration, auto-registration, and options binding.
dotnet add package Sylin.Sora.Messaging.Core
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..p{n} suffix to routing keys.| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
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 |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.4.0 | 440 | 9/5/2025 | 0.4.0 is deprecated because it is no longer maintained. |
| 0.2.20 | 411 | 8/22/2025 | 0.2.20 is deprecated because it is no longer maintained. |
| 0.2.18 | 466 | 8/20/2025 | 0.2.18 is deprecated because it is no longer maintained. |
| 0.2.17 | 472 | 8/19/2025 | 0.2.17 is deprecated because it is no longer maintained. |
| 0.2.16 | 463 | 8/18/2025 | 0.2.16 is deprecated because it is no longer maintained. |
See release notes: https://github.com/sylin-labs/sora-framework/releases