Interface IMessageRouter
Interface for message router.
Namespace: Kephas.Messaging.Distributed.Routing
Assembly: Kephas.Messaging.dll
Syntax
[AppServiceContract(AllowMultiple = true, MetadataAttributes = new Type[]{typeof(MessageRouterAttribute)})]
public interface IMessageRouter
Methods
| Improve this Doc View SourceDispatchAsync(IBrokeredMessage, IContext, CancellationToken)
Dispatches the brokered message asynchronously, typically over the physical medium.
Declaration
Task<(RoutingInstruction action, IMessage reply)> DispatchAsync(IBrokeredMessage brokeredMessage, IContext context, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IBrokeredMessage | brokeredMessage | The brokered message. |
| IContext | context | The routing context. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.ValueTuple<RoutingInstruction, IMessage>> | The asynchronous result yielding an action to take further and an optional reply. |
Events
| Improve this Doc View SourceReplyReceived
Occurs when a reply for is received to match a request sent from the container message broker.
Declaration
event EventHandler<ReplyReceivedEventArgs> ReplyReceived
Event Type
| Type | Description |
|---|---|
| System.EventHandler<ReplyReceivedEventArgs> |