Interface IReceiver<TRequest>
- Namespace
- Savvyio.Messaging
- Assembly
- Savvyio.Core.dll
Defines a consumer/receiver channel used by subsystems to receive a command and perform one or more actions (e.g., change the state).
public interface IReceiver<out TRequest>
where TRequest : IRequest
Type Parameters
TRequest
The type of the model to invoke on a handler.
Methods
ReceiveAsync(Action<AsyncOptions>)
Receive one or more message(s) asynchronous using Point-to-Point Channel/P2P MEP.
IAsyncEnumerable<IMessage<TRequest>> ReceiveAsync(Action<AsyncOptions> setup = null)
Parameters
setup
Action<AsyncOptions>The AsyncOptions which may be configured.
Returns
- IAsyncEnumerable<IMessage<TRequest>>
A task that represents the asynchronous operation. The task result contains a sequence of IMessage<T> whose generic type argument is IRequest.