Is it possible to disable retries in NServiceBus, version 3.2.2?
Using the following configuration, retries can be disabled:
<MsmqTransportConfig NumberOfWorkerThreads="1"
MaxRetries="0" />
<SecondLevelRetriesConfig Enabled="false"
TimeIncrease="00:00:10"
NumberOfRetries="0" />
But not when the thread count is set to 20. In this case, the message is retried twice:
<MsmqTransportConfig NumberOfWorkerThreads="20"
MaxRetries="0" />
<SecondLevelRetriesConfig Enabled="false"
TimeIncrease="00:00:10"
NumberOfRetries="0" />
This does look a lot like a bug. The retry behaviour should not depend on the number of threads.
The semantics of the MaxRetries is "At least X times". The reason for this is performance since we can't be a little more relaxed when it comes to syncronising our threads. You could also make your transport non transactional this will effectively give you one try for each message but you'll lose the error queue as well so failed messages are gone forever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With