VOOZH about

URL: https://www.nuget.org/packages/Kephas.Messaging.Distributed/

⇱ NuGet Gallery | Kephas.Messaging.Distributed 11.1.0




👁 Image
Kephas.Messaging.Distributed 11.1.0

Prefix Reserved
dotnet add package Kephas.Messaging.Distributed --version 11.1.0
 
 
NuGet\Install-Package Kephas.Messaging.Distributed -Version 11.1.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kephas.Messaging.Distributed" Version="11.1.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kephas.Messaging.Distributed" Version="11.1.0" />
 
Directory.Packages.props
<PackageReference Include="Kephas.Messaging.Distributed" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Kephas.Messaging.Distributed --version 11.1.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Kephas.Messaging.Distributed, 11.1.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Kephas.Messaging.Distributed@11.1.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Kephas.Messaging.Distributed&version=11.1.0
 
Install as a Cake Addin
#tool nuget:?package=Kephas.Messaging.Distributed&version=11.1.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Distributed messaging

The [[message processing|Architecture-of-messaging]] is an in-process feature, which is not per se bad, but in distributed scenarios it is limiting. The distributed messaging fills the gap by providing infrastructure components that can communicate in a such an environment.

Using the messaging infrastructure is a little more elaborate:

 // ensure the message has been sent
 await messageBroker.DispatchAsync(new RefreshCacheEvent { Key = "Users" }, ctx => ctx.OneWay()).PreserveThreadContext(); 

This can be achieved in a simpler way, using the provided extension methods:

 // ensure the message has been sent
 await messageBroker.PublishAsync(new RefreshCacheEvent { Key = "Users" }).PreserveThreadContext(); 

The distributed messaging flow

The participants in the distributed message flow are:

  • The brokered message: This is the message being sent through the underlying infrastructure to the processors.
  • The message broker: This is the in-process component dispatching the messages by the means of the underlying infrastructure.
  • The brokered message handler: This is the [[message handler|Architecture-of-messaging#message-handlers]] on the other end, receiving the brokered message and ensuring that it is processed and, if requested, a proper response is sent back.
  • Infrastructure dependent components which:
    • send/queue messages.
    • read the messages and forward them to the in-process [[message processor|Architecture-of-messaging#the-message-processor]] .

Brokered message

A brokered message (IBrokeredMessage) is a specialization of a [[message|Architecture-of-messaging#messages]] carrying with it the original message to be processed and some distributed environment information. It can be regarded as an "envelope" transporting the actual message.

  • Content: the message to be actually processed.
  • Sender: contains information about the message sender. For some broadcasts, it can be used to not forward the message to the original sender.
  • Channel: contains the channel to use. If not provided, the default channel will be used.
  • IsOneWay: indicates whether the sender awaits an answer to the message, or is just a fire and forget scenario.
  • Timeout: the timeout for requests awaiting for a response.

The message broker

This is a [[singleton application service|Application-Services#shared-scope-shared-or-instance-based-services]] dispatching messages through a channel to registered processors.

The IMessageBroker service contract has the following methods:

  • DispatchAsync(object message, [optionsConfig: Action<IDispatchingContext>], [cancellationToken: CancellationToken]): Task<IMessage>: Dispatches the brokered message asynchronously.
    • Depending on the IsOneWay setting in the brokered message, it waits for a response or not.

InProcessMessageBroker

The in-process message broker is the Kephas implementation for a message broker dispatching the message to the in-process [[message processor|Architecture-of-messaging#the-message-processor]]. It has the [[lowest override priority|Application-Services#override-priority]].

This is the default message broker used when no custom one has been defined. It is recommended to use real-world implementations, using established message queuing infrastructure.

The brokered message handler

Brokered messages are nothing more than [[message|Architecture-of-messaging#messages]] requiring proper handling. The brokered message handler is the default implementation forwarding the contained message to the in-process [[message processor|Architecture-of-messaging#the-message-processor]].

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  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. 
.NET Core netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 netstandard2.1 is compatible. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Kephas.Messaging.Distributed:

Package Downloads
Kephas.Orchestration

Provides the infrastructure for orchestrating microservices based on the Kephas Framework. Typically used areas and classes/interfaces/services: - IOrchestrationManager, IRuntimeAppInfo. - Interaction: AppHeartbeatEvent, AppStartedEvent, AppStoppedEvent. - Endpoints: StopAppMessage. Kephas Framework ("stone" in aramaic) aims to deliver a solid infrastructure for applications and application ecosystems.

Kephas.Messaging.Distributed.Redis

Provides distributed message routing over Redis using StackExchange.Redis. Typically used areas and classes/interfaces/services: - RedisAppMessageRouter. Kephas Framework ("stone" in aramaic) aims to deliver a solid infrastructure for applications and application ecosystems.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.1.0 1,643 4/13/2022
11.1.0-dev.4 293 4/6/2022
11.1.0-dev.3 290 3/30/2022
11.1.0-dev.2 291 3/23/2022
11.1.0-dev.1 275 3/23/2022
11.0.0 1,499 3/11/2022
11.0.0-dev.7 316 3/7/2022
11.0.0-dev.6 286 2/28/2022
11.0.0-dev.5 296 2/26/2022
11.0.0-dev.4 296 2/24/2022
11.0.0-dev.3 296 2/23/2022
11.0.0-dev.2 292 2/18/2022
11.0.0-dev.1 284 2/7/2022
10.3.0 1,508 1/18/2022
10.2.0 1,434 12/3/2021
10.1.0 5,438 11/23/2021
10.1.0-dev.7 374 11/17/2021
10.1.0-dev.6 317 11/16/2021
10.1.0-dev.5 339 11/10/2021
10.1.0-dev.4 349 11/8/2021
Loading failed

Please check https://github.com/kephas-software/kephas/releases for the change log.
           Also check the documentation and the samples from https://github.com/kephas-software/kephas/wiki and https://github.com/kephas-software/kephas/tree/master/Samples.