Wraps a message callback into IMessageReceiver
Inherits: IMessageReceiver
Description
The CallbackMessageReceiver class allows you to wrap message callbacks into IMessageReceiver.
Constructors
Creates an instance of the CallbackMessageReceiver.
public
CallbackMessageReceiver(Func<MessageEnvelope, IMessageQueue, Task> callback)
- callback: Func<MessageEnvelope, IMessageQueue, Task> - callback function that shall be wrapped into IMessageReceiver
Instance methods
receiveMessage
Receives an incoming message from the queue.
See also MessageEnvelope, IMessageQueue
public
Task ReceiveMessageAsync(MessageEnvelope envelope, IMessageQueue queue)
- envelope: MessageEnvelope - incoming message
- queue: IMessageQueue - queue where the message comes from