Is it possible to use the RecoverabilityAction.MoveToError retry to move to other queue?


(Jan Pieter George) #1

Instead of moving to error queue I’d like to move a message to a lower priority queue as a retry policy.
I couldn’t find any easy way to do this besides the MoveToError queue and simply list the lower priority queue.
Are there any downsides to use the MoveToError queue but intend normal processing?


(Andreas Öhlund) #2

Nothing other than that a few extra headers will be added

https://docs.particular.net/nservicebus/messaging/headers?version=core_7.2#diagnostic-and-informational-headers

https://docs.particular.net/nservicebus/messaging/headers?version=core_7.2#error-forwarding-headers

Can you elaborate on your business requirements, perhaps we can figure out a better way to do this?


(Jan Pieter George) #3

Great, so that could work.
I have a high priority and a low priority queue with the same processing (two NSB endpoint instances).

When something fails in the high priority queue we have a custom retry policy (10 * 5 minute delays), but I’d like to forward them to the low priority after the 2nd attempt to prevent big failures clogging up the high priority. For reference, it’s a multi-tenant environment and circumstances at 1 tenant could potentially affect performance at other tenants.

We’re thinking about more long term solutions (queues per tenant environment) but for now this seems like a decent solution.


(Jan Pieter George) #4

If someone else stumbles upon this, we went for a manual try/catch and a send to the different queue, MoveToError worked but resulted in error logging while at that point we didn’t want that yet.