Skip to content

Add new RebusConfigurer.Outbox StoreInSqlServer method overload that takes in Func<Task<IDbConnection>> connectionFactory instead of string connectionString #100

@robpackwood

Description

@robpackwood

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));

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions