Wraps a message callback into IMessageReceiver
Implements: IMessageReceiver
Description
The CallbackMessageReceiver class allows you to wrap message callbacks into IMessageReceiver.
Constructors
Creates an instance of the CallbackMessageReceiver.
CallbackMessageReceiver(callback: Callable[[MessageEnvelope, IMessageQueue], None])
- callback: Callable[[MessageEnvelope, IMessageQueue], None] - a callback function that shall be wrapped into IMessageReceiver
Instance methods
receive_message
Receives an incoming message from the queue.
See also MessageEnvelope, IMessageQueue
receive_message(envelope: MessageEnvelope, queue: IMessageQueue)
- envelope: MessageEnvelope - incoming message
- queue: IMessageQueue - queue where the message comes from