TestMessageReceiver

Class used to receive a message, obtain a list of received messages and the number of received messages, and to clear the message list.

Inherits: 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.

public TestMessageReceiver()

Properties

messages

Gets the list of received messages.

public List<MessageEnvelope> Messages { get; }

MessageCount

Gets the received message count.

public int MessageCount { get; }

Instance methods

ClearAsync

Clears all received messagers.

public Task ClearAsync(string correlationId)

  • correlationId: string - (optional) transaction id used to trace execution through the call chain.

ReceiveMessageAsync

Receives incoming message from the queue.

See also MessageEnvelope, IMessageQueue

public Task ReceiveMessageAsync(MessageEnvelope message, IMessageQueue queue)