Search code examples
c#nservicebusnservicebus3

Is there a fluent way of defining error queue in Nservicebus 3


I'm wondering if I can define the location of the error queue for my application using the fluent (Configure.With()) syntax?

Note this has changed in nservicebus3 to be configured via MessageForwardingInCaseOfFaultConfig


Solution

  • There is no easy way since we want to push users to put that setting in the config so that OPS can change it without a recompile. That said you can override where NSB reads the setting and put that in code instead. Do this by implementing:

    IProvideConfiguration

    Here is an example on how to do it:

    https://github.com/NServiceBus/NServiceBus/blob/master/Samples/PubSub/Subscriber1/ConfigOverride.cs