Search code examples
c#nservicebusnservicebus3

Where does MaxRetries on error setting go in NServicebus 3


With NServiceBus 3 the location of the config for the error queue has moved from

MsmqTransportConfig to MessageForwardingInCaseOfFaultConfig, however im not sure where the other properties specified on MsmqTransportConfig such as MaxRetries should go.

see http://docs.particular.net/nservicebus/msmq/transportconfig


Solution

  • This hasn't changed, you can still use the following to set the max retries

    <MsmqTransportConfig ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5"/>

    If you are using the new MessageForwardingInCaseOfFaultConfig then you can leave out the error setting.

    <MessageForwardingInCaseOfFaultConfig ErrorQueue="error"/>
    <MsmqTransportConfig NumberOfWorkerThreads="1" MaxRetries="5"/>