/// <summary>
 /// Configures Rebus to store subscriptions in the given collection in MongoDB, in the database specified by the connection string
 /// </summary>
 public static void StoreInMongoDb(
     this RebusSubscriptionsConfigurer configurer,
     string connectionString,
     string collectionName,
     ILogger logger)
 {
     configurer.Use(new MongoDbSubscriptionStorage(connectionString, collectionName, logger));
 }
Beispiel #2
0
        /// <summary>
        /// Configures Rebus to store subscriptions in PostgreSQL.
        /// </summary>
        public static PostgreSqlSubscriptionStorageFluentConfigurer StoreInPostgreSql(this RebusSubscriptionsConfigurer configurer, string connectionString, string subscriptionsTableName)
        {
            var storage = new PostgreSqlSubscriptionStorage(connectionString, subscriptionsTableName);

            configurer.Use(storage);

            return(new PostgreSqlSubscriptionStorageFluentConfigurer(storage));
        }
Beispiel #3
0
        /// <summary>
        /// Configures Rebus to store subscriptions in AdoNet.
        /// </summary>
        public static AdoNetSubscriptionStorageFluentConfigurer StoreInAdoNet(this RebusSubscriptionsConfigurer configurer, string connectionStringName, string subscriptionsTableName)
        {
            var connString = GetConnectionString(connectionStringName);
            var factory    = new AdoNetConnectionFactory(connString.ConnectionString, connString.ProviderName);
            var storage    = new AdoNetSubscriptionStorage(factory, subscriptionsTableName);

            configurer.Use(storage);

            return(storage);
        }