Path: redb-route/redb.Route/Abstractions/InflightExchange.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Abstractions/InflightExchange.cs
----
namespace redb.Route.Abstractions;
///
/// Snapshot of an exchange currently being processed (in-flight).
///
/// The exchange.
/// The route it entered.
/// When it entered the route (UTC).
/// The thread it entered on.
/// The endpoint the route consumes from, when known.
///
/// Set while the engine holds the exchange on purpose (a redelivery delay of onException, Retry or the dead
/// letter channel, a delay step): when that wait ends (UTC). Null while the exchange is being processed.
///
/// When the last such wait ended (UTC); null when the exchange has not waited.
public record InflightExchange(
string ExchangeId,
string RouteId,
DateTime StartedAt,
int ManagedThreadId,
string? FromEndpoint,
DateTime? WaitingUntil = null,
DateTime? LastWaitEndedAt = null)
{
///
/// When the exchange's current stretch of work began: the end of its last planned wait, or its start. A monitor
/// measures how long an exchange has been busy from here, so a redelivery after a delay is a fresh attempt.
///
public DateTime BusySince => LastWaitEndedAt ?? StartedAt;
}