Faactory.Channels.Messaging
0.1.2
dotnet add package Faactory.Channels.Messaging --version 0.1.2
NuGet\Install-Package Faactory.Channels.Messaging -Version 0.1.2
<PackageReference Include="Faactory.Channels.Messaging" Version="0.1.2" />
<PackageVersion Include="Faactory.Channels.Messaging" Version="0.1.2" />
<PackageReference Include="Faactory.Channels.Messaging" />
paket add Faactory.Channels.Messaging --version 0.1.2
#r "nuget: Faactory.Channels.Messaging, 0.1.2"
#:package Faactory.Channels.Messaging@0.1.2
#addin nuget:?package=Faactory.Channels.Messaging&version=0.1.2
#tool nuget:?package=Faactory.Channels.Messaging&version=0.1.2
Channels Messaging
Messaging support for Channels.
This package provides a simple publish/subscribe abstraction that allows messages to be exchanged between channel instances and external components.
[!NOTE] This project is currently incubated and is not yet considered production-ready. The API may change in future releases.
Features
- Publish messages to channels
- Subscribe to channel messages
- Channel-scoped message dispatching
- Request/response workflows through message correlation
- Transport-agnostic abstractions
Getting Started
Enable messaging on a channel configuration.
services.AddChannels( channel =>
{
channel.AddMessaging( messaging =>
{
messaging.AddMessageHandler<MyMessageHandler>();
} );
} );
Implement a message handler.
public class MyMessageHandler : IChannelMessageHandler
{
public string Type => "sample.message";
public Task HandleAsync(
IChannel channel,
ChannelMessage message,
CancellationToken cancellationToken = default )
{
// handle message
return Task.CompletedTask;
}
}
Publish a message.
await channelPublisher.PublishAsync(
new ChannelMessage(
channelId,
"sample.message",
JsonSerializer.SerializeToElement( new
{
Value = 123
} )
)
);
Message Correlation
Each ChannelMessage contains a unique MessageId and an optional CorrelationId.
These can be used to implement request/response workflows and correlate responses to previously published messages.
Transports
This package only defines the messaging abstractions and channel-side dispatching mechanisms.
Transport implementations are not included and must be provided separately. You can implement your own transport or use existing ones that integrate with this messaging system.
| 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
- Faactory.Channels.Core (>= 2.8.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.