Interface IMessageBroker
Singleton application service contract for distributed message broker.
Namespace: Kephas.Messaging.Distributed
Assembly: Kephas.Messaging.dll
Syntax
[SingletonAppServiceContract]
public interface IMessageBroker
Methods
| Improve this Doc View SourceDispatchAsync(IBrokeredMessage, IContext, CancellationToken)
Dispatches the brokered message asynchronously.
Declaration
Task<IMessage> DispatchAsync(IBrokeredMessage brokeredMessage, IContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IBrokeredMessage | brokeredMessage | The brokered message. |
IContext | context | The dispatching context. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IMessage> | The asynchronous result that yields an IMessage. |
Extension Methods
MessageBrokerExtensions.PublishAsync(IMessageBroker, Object, IEndpoint, IContext, CancellationToken)