In the previous post, we took a look at how Rebus can use the external timeout service to store timeouts its. The other way of using Rebus’ timeout service, is to use the internal timeout service – that’s right, every Rebus service can function as its own timeout manager.
In fact, the external timeout service is just an ordinary Rebus service that throws exceptions if you send it something that is not a
Since the external timeout service is the default choice, you have to do something in order to enable the internal timeout service. Not much, though – check this out:
.(...) //< the usual stuff
.Timeouts(t => t.StoreInSqlServer(connectionString, "timeouts")
and like that, your Rebus service will store its timeouts in a table called “timeouts” in the database specified by the given connection string, and it will automatically create the table if it does not exist when it starts up.
Only thing left is to lean back and