Sylin.Koan.Messaging.Core
0.17.0
dotnet add package Sylin.Koan.Messaging.Core --version 0.17.0
NuGet\Install-Package Sylin.Koan.Messaging.Core -Version 0.17.0
<PackageReference Include="Sylin.Koan.Messaging.Core" Version="0.17.0" />
<PackageVersion Include="Sylin.Koan.Messaging.Core" Version="0.17.0" />
<PackageReference Include="Sylin.Koan.Messaging.Core" />
paket add Sylin.Koan.Messaging.Core --version 0.17.0
#r "nuget: Sylin.Koan.Messaging.Core, 0.17.0"
#:package Sylin.Koan.Messaging.Core@0.17.0
#addin nuget:?package=Sylin.Koan.Messaging.Core&version=0.17.0
#tool nuget:?package=Sylin.Koan.Messaging.Core&version=0.17.0
Sylin.Koan.Messaging.Core
Core messaging abstractions and helpers for Koan: bus configuration, auto-registration, and options binding.
- Target framework: net10.0
- License: Apache-2.0
Install
dotnet add package Sylin.Koan.Messaging.Core
Links
- Messaging reference: https://github.com/sylin-labs/Koan-framework/tree/dev/docs/reference
Usage
Declare messages with attributes, then send via extension methods.
using Koan.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/SendToare defined onMessagingExtensionsand operate per-message when batching.- Headers/correlation/idempotency are promoted from attributes; partitions add a
.p{n}suffix to routing keys.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Sylin.Koan.Core (>= 0.17.0 && < 0.18.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Sylin.Koan.Messaging.Core:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Messaging.Connector.RabbitMq
RabbitMQ transport for Koan Messaging: resilient connection management, config-first options, and inbox integration. |
|
|
Sylin.Koan.Cache.Coherence.Messaging
Cache coherence over Koan.Messaging — alternative to Redis pub/sub when an app already has a messaging bus configured. Rides existing infrastructure; preempts the Redis pub/sub channel via [ProviderPriority(150)] when both are registered. |
|
|
Sylin.Koan.Jobs.Transport.Messaging
Cross-node push-dispatch for Koan.Jobs over Koan.Messaging. Referencing this package fans a lightweight "job ready" wake across nodes so workers claim newly-submitted work without waiting out the poll interval. The ledger remains the truth; the signal only trims dispatch latency. |
|
|
Sylin.Koan.Jobs.Core
Entity-first job runtime for Koan: in-memory defaults, persistence, progress callbacks, retry policies, and messaging bridges. |
GitHub repositories
This package is not used by any popular GitHub repositories.
See release notes: https://github.com/sylin-labs/Koan-framework/releases