Class used to receive a message, obtain a list of received messages and the number of received messages, and to clear the message list.
Implements: IMessageReceiver, ICleanable
Description
The TestMessageReceiver allows you to receive a message, obtain a list of received messages and the number of received messages, and to clear the message list.
Constructors
Creates a TestMessageReceiver component.
TestMessageReceiver()
Properties
messages
Gets the list of received messages.
List<MessageEnvelope> get messages
- returns: List<MessageEnvelope> - list of received messages
messageCount
Gets the received message count.
int get messageCount
- returns: int - number of messages
Instance methods
clear
Clears all received messagers.
@override
Future clear(String? correlationId)
- correlationId: String - (optional) transaction id to trace execution through call chain.
receiveMessage
Receives incoming message from the queue.
See also MessageEnvelope, IMessageQueue
Future receiveMessage(MessageEnvelope envelope, IMessageQueue queue)
- envelope: MessageEnvelope - an incoming message
- queue: IMessageQueue - a queue where the message comes from