MeshWeaver.Messaging.Hub
3.0.0-rc13
This is a prerelease version of MeshWeaver.Messaging.Hub.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package MeshWeaver.Messaging.Hub --version 3.0.0-rc13
NuGet\Install-Package MeshWeaver.Messaging.Hub -Version 3.0.0-rc13
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="MeshWeaver.Messaging.Hub" Version="3.0.0-rc13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.Messaging.Hub" Version="3.0.0-rc13" />
<PackageReference Include="MeshWeaver.Messaging.Hub" />
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 MeshWeaver.Messaging.Hub --version 3.0.0-rc13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MeshWeaver.Messaging.Hub, 3.0.0-rc13"
#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 MeshWeaver.Messaging.Hub@3.0.0-rc13
#: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=MeshWeaver.Messaging.Hub&version=3.0.0-rc13&prerelease
#tool nuget:?package=MeshWeaver.Messaging.Hub&version=3.0.0-rc13&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MeshWeaver.Messaging.Hub
Overview
MeshWeaver.Messaging.Hub implements the core modular components of the MeshWeaver ecosystem - Message Hubs. Based on the actor model pattern, each hub is an independent unit that processes messages sequentially and communicates with other hubs through message passing.
Key Concepts
Message Hubs
- Each hub has a unique address for identification
- Hubs process one message at a time (actor model)
- Each hub has its own dependency injection container
- Hubs can be instantiated dynamically
- Support for hierarchical hosting of hubs
Features
- Message routing between hubs
- Request-response pattern support
- Hierarchical hub hosting
- Configurable message handlers
- Built-in dependency injection
- Asynchronous message processing
Usage Examples
Basic Request-Response Pattern
// Define message types
record SayHelloRequest : IRequest<HelloEvent>;
record HelloEvent;
// Configure message handler
configuration.WithHandler<SayHelloRequest>((hub, request) =>
{
hub.Post(new HelloEvent(), options => options.ResponseFor(request));
return request.Processed();
});
// Send request and await response
var response = await host.AwaitResponse(
new SayHelloRequest(),
o => o.WithTarget(new HostAddress())
);
Hierarchical Hub Hosting
// Create a sub-hub with its own address
var subHub = client.ServiceProvider.CreateMessageHub(
new NewAddress(),
conf => conf.WithTypes(typeof(Ping), typeof(Pong))
);
// Send message from sub-hub to host
var response = await subHub.AwaitResponse(
new Ping(),
o => o.WithTarget(new HostAddress())
);
Configuration
Message hubs can be configured with custom handlers, message types, and processing options:
var configuration = new MessageHubConfiguration()
.WithTypes(typeof(Ping), typeof(Pong))
.WithHandler<Ping>((hub, request) => {
// Handle message
});
Integration
- Seamless communication between MeshWeaver components
- Support for distributed systems
- Easy integration with dependency injection
- Scalable message processing
Related Projects
- MeshWeaver.Messaging.Contract - Message contracts and interfaces
- Other MeshWeaver components
See Also
Refer to the main MeshWeaver documentation for more information about the overall project architecture.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- MeshWeaver.Domain (>= 3.0.0-rc13)
- MeshWeaver.Messaging.Contract (>= 3.0.0-rc13)
- MeshWeaver.Reflection (>= 3.0.0-rc13)
- MeshWeaver.ServiceProvider (>= 3.0.0-rc13)
- MeshWeaver.ShortGuid (>= 3.0.0-rc13)
- MeshWeaver.Utils (>= 3.0.0-rc13)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Namotion.Reflection (>= 3.5.1)
- System.Reactive (>= 6.1.0)
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 |
|---|
Loading failed