The Learning Transport simulates queuing infrastructure by storing all message actions in the local file system. All files and directories are relative to the current solution directory.
Added in Version 6.3.
Some recommended use cases are:
- Learning/Experimenting with NServiceBus features.
- Building a spike or demo.
- Reproducing a bug that is not related to a production transport, for example when raising a support case.
By default the transport runs with concurrency limited to 1. See the tuning for details on how to configure concurrency levels.
By default all data is stored in a
.learningtransport directory that exists at the solution root.
To configure the storage location:
var transport = endpointConfiguration.UseTransport<LearningTransport>(); transport.StorageDirectory("PathToStoreTransportFiles");
To simulate a real transport, the serialized message size supported by the learning transport is limited to 64 kB. To remove this restriction:
var transport = endpointConfiguration.UseTransport<LearningTransport>(); transport.NoPayloadSizeRestriction();
The serialized contents of a message.
- Serialization is done using the configured Serializer.
- File convention is
A serialized representation of a messages metadata.
- First line is the path to the Message Body File.
- Remaining lines are the json serialized headers of the message.
- File convention is
When a message fails processing both its metadata and body files will be moved to the "error" directory. The name of the directory will be derived from configured error queue address. The default error queue name, and hence directory name, is "error".
Each endpoint will have a corresponding directory under
.learningtransport with the following structure
Each incoming messages will have a corresponding Metadata File at the root of the endpoint directory.
Each incoming messages will have a corresponding Body in this directory.
Used to store messages that have been send with a Delayed Delivery. One directory per time stamp (of a second granularity) with the format
yyyyMMddHHmmss. Each timestamp directory can contain multiple Metadata Files.
Transaction directory used to mark a message as being processed. Also prevents duplicate processing.
Used to temporarily store outgoing message that are sent during the processing of another message.