ID : dispatch.inbox.inmemory
Name : Inbox InMemory transport dispatch
Maturity : GA
Summary : Publish leased inbox envelopes through in-process channels for tests and local multi-service pipelines without external brokers.
AddInMemoryTransport() registers InMemoryTransportModule at the root, and UseInMemoryDispatch registers TransportInboxDispatchModule as its inbox feature bridge. Messages flow through System.Threading.Channels to a logical destination name. This path is used heavily in integration tests to simulate remote dispatch and pair with InMemory ingress.
Package Role LiteBus.Inbox.Dispatch.InMemoryRegistration glue LiteBus.Inbox.DispatchShared dispatcher LiteBus.Transport.InMemoryChannel-based transport
dispatch.transport-core
transport.inmemory
durable-core.inbox
Thread-safe within one process; not cross-process.
Requeue on failed consume re-enqueues on the channel (transport invoker).
Same header mapping as broker transports.
Not for production cross-host messaging.
Does not survive process restarts.
services. AddLiteBus ( litebus =>
{
litebus. AddInMemoryTransport ();
litebus. AddInbox ( inbox =>
{
inbox. EnableInboxProcessor ();
inbox. UseInMemoryDispatch ( options =>
{
options.DefaultDestination = "orders.commands" ;
});
});
});
API Role InboxModuleBuilder.UseInMemoryDispatch(Action<TransportInboxDispatcherOptions>? configure = null)Registers inbox transport dispatcher that requires the root in-memory transport TransportInboxDispatcher.DispatchAsync(InboxEnvelope, CancellationToken)Shared publish logic over in-process channel transport
Signal Detail send {destination}Emitted by InMemoryPublisher with destination and route tags process {destination}Paired ingress/consumer in the same process litebus.transport.circuit_breaker.*Tag inmemory; standalone breaker registered by InMemory transport litebus.inbox.processor.*Standard processor metrics
Activities remain available for test assertions even without external OTLP export.
Test method Project InboxDispatchExtensions_ShouldRegisterTransportDispatcherLiteBus.Durable.IntegrationTests (Registration/)ProcessPendingAsync_ShouldPublishLeasedEnvelopeToInMemoryDestinationLiteBus.Durable.IntegrationTests (Dispatch/Inbox/InMemory/)ProcessPendingAsync_WhenPersistSkippedAfterDispatch_ShouldRedispatchOnRetryLiteBus.Durable.IntegrationTests (Dispatch/Inbox/InMemory/)
Inbox dispatch failure and retry path beyond persist-skipped scenario.
Custom route resolver and tenant route strategy branches.
Cross-process delivery, which the in-memory adapter does not support.
Production cross-host messaging
Surviving process restarts