Class DefaultInflightRepository
Thread-safe in-memory implementation of .
Uses ConcurrentDictionary for O(1) register/unregister and per-route counting.
public sealed class DefaultInflightRepository : IInflightRepository
Inheritance
Implements
Properties
Methods
BeginWait(string, TimeSpan)
Marks an in-flight exchange as held by the engine on purpose for delay (a redelivery delay, a
public IDisposable BeginWait(string exchangeId, TimeSpan delay)
Browse()
Returns a snapshot of all in-flight exchanges.
public IReadOnlyList<InflightExchange> Browse()
Browse(string)
Returns a snapshot of in-flight exchanges for a specific route.
public IReadOnlyList<InflightExchange> Browse(string routeId)
CountByRoute(string)
Number of in-flight exchanges for a specific route.
public int CountByRoute(string routeId)
Register(InflightExchange)
Registers an exchange as in-flight.
public void Register(InflightExchange entry)
Unregister(string)
Removes an exchange from the in-flight registry.
public void Unregister(string exchangeId)
Remarks
An exchange is registered once per entry into a route, and a copy keeps the exchange id: an exchange entering a
route again (a route calling itself, parallel branches through one sub-route) registers the same id more than once.
The entries are counted, so the exchange stays in flight until the last of them has finished; the entry shown is
the first one.