Table of Contents

Class MessageTrackingSession

Namespace
Ratatoskr.Testing
Assembly
Ratatoskr.Testing.dll

A per-test message tracking session that creates a unique trace ID for correlating messages. All messages published within this session's scope are tagged with the session's trace ID, enabling parallel test isolation.

public class MessageTrackingSession : IAsyncDisposable
Inheritance
MessageTrackingSession
Implements
Inherited Members

Properties

Dispatched

Messages captured at the Dispatched stage (handler invocation completed).

InboxDispatched

Messages captured at the InboxDispatched stage (inbox processor attempted handler delivery).

InboxPoisoned

Messages captured at the InboxPoisoned stage (handler exceeded max retries).

InboxQueued

Messages captured at the InboxQueued stage (message accepted into inbox).

OutboxPoisoned

Messages captured at the OutboxPoisoned stage (outbox message exceeded max retries).

OutboxSent

Messages captured at the OutboxSent stage (outbox processor sent to transport).

OutboxStaged

Messages captured at the OutboxStaged stage (serialized into outbox entity).

Published

Messages captured at the Published stage (after PublishDirectAsync).

Received

Messages captured at the Received stage (consumer received from transport).

Sent

Messages captured at the Sent stage (bytes on the wire).

TraceId

The unique trace ID for this session.

Methods

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

WaitForDispatched<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the Dispatched stage.

WaitForInboxDispatched<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the InboxDispatched stage.

WaitForInboxPoisoned<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the InboxPoisoned stage.

WaitForInboxQueued<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the InboxQueued stage.

WaitForOutboxPoisoned<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the OutboxPoisoned stage.

WaitForPublished<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the Published stage.

WaitForReceived<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the Received stage.

WaitForSent<T>(TimeSpan?, Func<TrackedMessage, bool>?)

Waits for a message of the specified type to reach the Sent stage.