开发者

NServiceBus delay retries

开发者 https://www.devze.com 2023-02-16 23:04 出处:网络
We need to be able to specify a delay in retrying fa开发者_如何学运维iled messages. NServiceBus retries more or less instantly up to n times (as configured) before moving the message to error queue.

We need to be able to specify a delay in retrying fa开发者_如何学运维iled messages. NServiceBus retries more or less instantly up to n times (as configured) before moving the message to error queue.

What I need to be able to do is for a given message type specify that its not to be retried for an arbitrary period of time

I've read the post here:

NServiceBus Retry Delay

but this doesn't give what I'm looking for.

Kind regards

Ben


This isn't supported as of right now. What you can do is let the messages go to the error queue and setup and endpoint to monitor that queue. Your code could then determine the rules for replaying messages. You could use a Saga to achieve this in combination with the Timeout manager.

Typically you'll have some rules around when to replay messages. In NSB 3.0 we have a better way to do this using the FaultManager. This gives you options on where to put failed messages and includes the exception. One of the options is a DB which you could then set up a job to inspect the exception and determine what to do with it.

Lastly a low tech way of getting this is to schedule a job that runs the ReturnToSourceQueue tool periodically to "clean up". We are doing this and including an alert so we don't endlessly cycle messages around.

0

精彩评论

暂无评论...
验证码 换一张
取 消