NServiceBus subscribe to the error queue

Is it possible to write an NServiceBus message handler that subscribes to an error queue to allow us to execute decision logic when an error message is sent there?

It is advisable that my regular message and error queue subscribers are under the same process / instance of NServiceBus.host.exe, if possible

thanks

Ben

+6
nservicebus
source share
1 answer

You can have an endpoint in the error queue. The problem will be that you will not know why it is there. You want to consider looking at 3.0 a lot if you can make sure that this is very early in the dev loop. 3.0 introduces a FaultManager that throws an exception that causes the message to fall into the error queue.

You cannot connect the endpoint to two queues; you must have 2 endpoints. It is best to have a queue of errors on another machine, so it would be better to have a separate endpoint on this machine.

Updated links for comment: Error Management in 3.0 and Custom Error Processing in 15 minutes

+5
source share

All Articles