holonsoft.NoQBus.Abstractions
2.1.0
dotnet add package holonsoft.NoQBus.Abstractions --version 2.1.0
NuGet\Install-Package holonsoft.NoQBus.Abstractions -Version 2.1.0
<PackageReference Include="holonsoft.NoQBus.Abstractions" Version="2.1.0" />
<PackageVersion Include="holonsoft.NoQBus.Abstractions" Version="2.1.0" />
<PackageReference Include="holonsoft.NoQBus.Abstractions" />
paket add holonsoft.NoQBus.Abstractions --version 2.1.0
#r "nuget: holonsoft.NoQBus.Abstractions, 2.1.0"
#:package holonsoft.NoQBus.Abstractions@2.1.0
#addin nuget:?package=holonsoft.NoQBus.Abstractions&version=2.1.0
#tool nuget:?package=holonsoft.NoQBus.Abstractions&version=2.1.0
NoQBus
An async, fast and slim message bus for transparent inproc / outbound messaging
It has
- no queue!
- fully async processing
- parallelization ⇒ every consumer runs it's own task/thread!
- transparent client / server functionality
- immutable records as messages
- no serialization if a message stays on one side!
- advanced filtering of requests or repsonses
new in v2.1
- Add support for net 8, net9, net10
- Chg Xunit async void (deprecated) to async Task support
Samples
Subscription with no response:
private async Task SubscriberFunc(MyMessage message) {
//do sth with your message while running on your own task/thread
}
await _messageBus.Subscribe<MyMessage>(SubscriberFunc);
Subscription with response:
private async Task<MyResponse> SubscriberFunc(MyRequest message) {
//do sth with your message while running on your own task/thread
return new MyResponse(someResult);
}
await _messageBus.Subscribe<MyRequest, MyResponse>(SubscriberFunc);
Publish fire and forget message:
await _messageBus.Publish(new MyMessage());
Publish and request some responses:
As many can subscribe to the same messages you can get multiple responses.
MyResponse[] responses = await _messageBus.GetResponses<MyResponse>(new MyRequest());
Sample message:
public record MyMessage : MessageBase {
public string OneOfMyProps { get; init; }
}
Sample request:
public record MyRequest : RequestBase {
public string OneOfMyProps { get; init; }
}
Sample response:
public record MyResponse : ResponseBase {
public string OneOfMyProps { get; init; }
}
Request and response with known response/request type
public record MyRequest : RequestBase<MyResponse> {
public string OneOfMyProps { get; init; }
}
public record MyResponse : ResponseBase<MyRequest> {
public string OneOfMyProps { get; init; }
}
Starting the Messagebus
Only local
diContainerBuilder.AddNoQMessageBus(); //or servicecollection
//after building the container:
diContainer.Resolve<IMessageBusConfig>().StartLocalNoQMessageBus();
//from now on you can use:
_messageBus = diContainer.Resolve<IMessageBus>();
SignalR server
diContainerBuilder.AddNoQMessageBus(); //or servicecollection
diContainerBuilder.AddNoQSignalRHost(); //or servicecollection
//after building the container:
await diContainer.StartNoQSignalRHost(x => x.UseUrl("http://localhost:5001"));
//from now on you can use:
_messageBus = diContainer.Resolve<IMessageBus>();
SignalR client
diContainerBuilder.AddNoQMessageBus(); //or servicecollection
diContainerBuilder.AddNoQSignalRClient(); //or servicecollection
//after building the container:
await diContainer.StartNoQSignalRClient(x => x.UseUrl("http://localhost:5001"));
//from now on you can use:
_messageBus = diContainer.Resolve<IMessageBus>();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 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 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
- No dependencies.
-
net8.0
- System.Text.Json (>= 10.0.0)
-
net9.0
- System.Text.Json (>= 10.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on holonsoft.NoQBus.Abstractions:
| Package | Downloads |
|---|---|
|
holonsoft.NoQBus.SignalR.Abstractions
Abstractions for the SignalR bridge of our asynchronous, fast and fully parallelized message bus. |
|
|
holonsoft.NoQBus
Asynchronous, fast and fully parallelized message bus. |
|
|
holonsoft.NoQBus.SignalR.Client
Client part for the SignalR bridge of our asynchronous, fast and fully parallelized message bus. |
|
|
holonsoft.NoQBus.SignalR.Host
Host part for the SignalR bridge of our asynchronous, fast and fully parallelized message bus. |
GitHub repositories
This package is not used by any popular GitHub repositories.