For Sagas, I configure with syntax like this:
rebusConfigurer.Sagas(configurer =>
{
configurer.EnforceExclusiveAccess();
configurer.StoreInSqlServer(
config.RebusConfig.PersistenceConnectionFactory,
config.RebusConfig.SagaDataDbTable, config.RebusConfig.SagaIndexDbTable);
});
For Timeouts, I configure with syntax like this:
rebusConfigurer.Timeouts(configurer => configurer.StoreInSqlServer(
config.RebusConfig.PersistenceConnectionFactory, config.RebusConfig.TimeoutsDbTable));
In both examples above StoreInSqlServer takes in Func for a connectionFactory parameter.
When configuring Outbox, the StoreInSqlServer() method is inconsistent with the methods mentioned above and could use an overload, which takes the same Func for a connectionFactory parameter. I would prefer to not store the database username and password in plain text for this connectionString and utilize the existing connectionFactory I already have in scope.
Current code configuring the Outbox settings:
rebusConfigurer.Outbox(configurer => configurer.StoreInSqlServer(
config.RebusConfig.PersistenceConnectionString, config.RebusConfig.OutboxTableName));