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.
messages(): List[MessageEnvelope]
- returns: List[MessageEnvelope] - list of received messages
message_count
Gets the received message count.
message_count(): int
- returns: int - number of messages
Instance methods
clear
Clears all received messagers.
clear(correlation_id: Optional[str])
- correlationId: Optional[str] - (optional) transaction id used to trace execution through the call chain.
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