NServiceBus Relaunch Delay

What is the best way to configure / NServiceBus code to delay resending messages?

In its default configuration, the repetition occurs almost immediately until the number of attempts specified in the configuration file. Ideally, I would like to try again in an hour, etc.

Also, how does HandleCurrentMessageLater() ? Regarding the aspect of Later ?

+6
nservicebus
source share
3 answers

Repeated attempts by the NSB fix temporary issues, such as deadlocks, etc. Longer attempts are better handled by creating another process that monitors the error queue and puts them back in the original queue at the time interval you need. Take a look at ReturnToSourceQueue.exe , which comes with NSB for reference.

Edit: NServiceBus now supports this, we call it second-level repeats , see http://docs.particular.net/ for more details

+6
source share

Here's a blog post about why NServiceBus does not include retry delay, which I wrote after I asked Udi on this very issue in my class on distributed systems architecture:

NServiceBus Retries: Why There Is No Delay Delay?

And here is a discussion thread covering some points related to building the monitor endpoint / re-checking the error queue:

http://tech.groups.yahoo.com/group/nservicebus/message/10964

As for HandleCurrentMessageLater (), everything that does puts the current message at the end of the queue. If there are no other pending messages, they will be processed immediately.

+4
source share

As with NServiceBus 3.2.1, they provide a problem-free solution to eliminate delays in the event of consecutive message failures. The pre-existing retry mechanism still repeats errors without delay to handle cases such as database locks, fast self-healing network problems, etc.

After the message has been reconfigured the configured number of times, the message is moved to the "Repeat second level" queue. This queue, configured below, will retry after a delay of 10, 20, and 30 seconds, then the message will be moved to the configured error queue. You can change these values ​​to suit your environment better.

You can also check this link: http://docs.particular.net/nservicebus/second-level-retries

+4
source share

All Articles