I have two endpoints.
Endpoint 1:
Web endpoint: - No handler
If I'm getting your scenario correctly, this is a single transaction/ unit of work...
All of the messages are invoked by the web endpoint sending a message to the endpoint, and all the subsequent messages are dispatched from that handler... so even though the endpoint can be multi threaded, they are all serialised in the same transaction, so if i'm not wrong they are are going to be sequential...
If you don't want to run multiple endpoints, take a look at this issue describing running multiple endpoints in the same process: https://github.com/Particular/NServiceBus/issues/1357
Does this help?
Unless it has changed since I started using NServiceBus, the "unlicenced"
version only runs 1 worker thread so it only processes 1 message at a time.
You can alter this in the config by altering the NumberOfWorkerThreads
value on the transport, however you need a valid licence in order to increase the number above 1
.
<MsmqTransportConfig MaxRetries="0" NumberOfWorkerThreads="1" />
In NServiceBus v4, you need to configure the MaximumConcurrencyLevel
value on the TransportConfig
:
<TransportConfig MaximumConcurrencyLevel="5"
MaxRetries="2"
MaximumMessageThroughputPerSecond="0"/>
see Failure handling & throttling