title | component | reviewed | related | redirects | |||
---|---|---|---|---|---|---|---|
Learning Transport |
LearningTransport |
2024-02-19 |
|
|
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.
include: learning-warning
Added in Version 6.3.
include: learning-usages
ServiceControl (and therefore ServicePulse and ServiceInsight) are only supported for demonstration purposes through the use of the Platform Sample package.
Feature | |
---|---|
Transactions | None, ReceiveOnly, SendsWithAtomicReceive |
Pub/Sub | Native |
Timeouts | Native |
Large message bodies | LearningTransport can handle arbitrary message sizes within available resources |
Scale-out | Competing consumer |
Scripted Deployment | Not supported |
Installers | Not supported, the transport always creates the required folder structure |
Native integration | Not supported |
The learning transport simulates a multicast transport, which means that routing configuration isn't needed in order to publish events. See the native publish/subscribe documentation for further details.
snippet: LearningTransport
The transport supports the following Transport Transaction Modes:
- Sends atomic with Receive (Default)
- Receive Only
- Unreliable (Transactions Disabled)
By default, the transport runs with concurrency limited to 1. See the tuning for details on how to configure concurrency levels.
Note
Production transports will run with a higher concurrency setting by default
By default, all data is stored in a .learningtransport
directory. The endpoint will traverse the folder hierarchy upwards in search for a .learningtransport
directory or create one at the solution root folder if no matching folder has been found before.
To manually configure the storage location:
snippet: StorageDirectory
Warning
When using source control the storage directory should be excluded and never committed.
To simulate a real transport, the serialized message size supported by the learning transport is limited to 64 kB. To remove this restriction:
snippet: NoPayloadSizeRestriction
Native publish and subscribe is simulated by storing subscriber metadata in a .events
folder in the root storage directory. Subscribers will write their address to a file named {storage directory}\.events\{message type fullname}\{endpointname}.subscription
. Publishers will send copies of each published event to all registered subscribers.
The serialized contents of a message.
- Serialization is done using the configured Serializer.
- File convention is
[MessageId].body.txt
.
A serialized representation of the message metadata.
- The first line is the path to the Message Body File.
- The remaining lines are the json serialized headers of the message.
- File convention is
[MessageId].metadata.txt
.
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 the directory name, is "error".
Each endpoint will have a corresponding directory under .learningtransport
with the following structure:
Each incoming message will have a corresponding Metadata File at the root of the endpoint directory.
Each incoming message will have a corresponding Body in this directory.
Used to store messages that have been sent with a Delayed Delivery. One directory per timestamp (of a second granularity) with the format yyyyMMddHHmmss
. Each timestamp directory can contain multiple Metadata Files.
Transaction directory that is used to mark a message as being processed. Also prevents duplicate processing.
Used to temporarily store outgoing messages that are sent during the processing of another message.