EAI Guy.net

Enterprise Applicaiton Integration and SOA 2.0

Monthly Archives: December 2012

NServiceBus & Second Level Retries

You may be familiar with how NServiceBus immediately re-tries transactions that fail, and the number of re-tries is configurable. This is handy in situations like when a deadlock is hit – the retry will likely succeed:


You are also probably aware that sometimes it takes a few moments for something else to happen in the system before our transaction will succeed. NSB now has a “second-level retry” feature that kicks in when  immediate retries are used up: NSB waits a configurable interval (10 seconds in the example below), then re-tries the transaction with a fresh set of immediate re-tries. This is incredibly useful in situations where multiple messages are coming in with dependencies on each other (though a Saga would be better here), or in situation where a dependent system is known to go down for a few minutes or hours. This feature could be used to keep error-queue counts down and reduce support burden: