Stark.MessageBroker
1.0.0.4
See the version list below for details.
dotnet add package Stark.MessageBroker --version 1.0.0.4
NuGet\Install-Package Stark.MessageBroker -Version 1.0.0.4
<PackageReference Include="Stark.MessageBroker" Version="1.0.0.4" />
<PackageVersion Include="Stark.MessageBroker" Version="1.0.0.4" />
<PackageReference Include="Stark.MessageBroker" />
paket add Stark.MessageBroker --version 1.0.0.4
#r "nuget: Stark.MessageBroker, 1.0.0.4"
#:package Stark.MessageBroker@1.0.0.4
#addin nuget:?package=Stark.MessageBroker&version=1.0.0.4
#tool nuget:?package=Stark.MessageBroker&version=1.0.0.4
Message-Broker
A simple, asynchronous, in-memory message broker that provides publish/subscribe functionality between loosely coupled components.
The library makes use of LibLog to provide logging abstraction. For more information, see: https://github.com/damianh/LibLog.
Usage
Messages are posted and subscribed to by type, with the ability to execute custom actions for each message type.
In the most basic example, a generic message with no data is posted to the broker and forwarded to subscribers, with each function passed in the subscription executed.
// Message class
public class GenericMessage : Message
{
}
// Subscribe to messages and perform action when received
broker.Subscribe<GenericMessage>(() =>
{
// do interesting things...
return Task.CompletedTask;
},
"subscription name");
// Post message
await broker.PostAsync<GenericMessage>();
Message Broker also supports posting messages with instance data, which is then available to the executed function.
// Message class
public class FooMessage : Message<Foo>
{
}
// Subscribe to messages and perform action when received
broker.Subscribe<FooMessage>(fooMsg =>
{
var data = fooMsg.Data.Data;
// do interesting things with data...
},
"subscription name");
// Post message
await broker.PostAsync(new FooMessage());
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- AsyncEnumerator (>= 2.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.3.18541 | 6,205 | 6/6/2024 |
| 2.0.3.17936 | 296 | 4/3/2024 |
| 2.0.3.17930 | 150 | 4/3/2024 |
| 2.0.3.13052 | 3,906 | 4/6/2023 |
| 2.0.3.6693 | 4,532 | 4/6/2022 |
| 2.0.2.1934 | 5,328 | 8/2/2021 |
| 2.0.2.319 | 1,298 | 4/7/2021 |
| 2.0.1.1 | 4,057 | 10/8/2020 |
| 2.0.0.1 | 2,649 | 11/27/2019 |
| 1.0.1.7 | 631 | 11/7/2019 |
| 1.0.0.4 | 657 | 9/17/2019 |