public ReceiveStrategyFactory(IConnectionStore connectionStore, LocalConnectionParams localConnectionParams, Address errorQueueAddress, ConnectionFactory sqlConnectionFactory)
 {
     this.connectionStore = connectionStore;
     this.errorQueueAddress = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
     this.sqlConnectionFactory = sqlConnectionFactory;
 }
 public ReceiveStrategyFactory(IConnectionStore connectionStore, LocalConnectionParams localConnectionParams, Address errorQueueAddress, ConnectionFactory sqlConnectionFactory)
 {
     this.connectionStore       = connectionStore;
     this.errorQueueAddress     = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
     this.sqlConnectionFactory  = sqlConnectionFactory;
 }
 public SqlServerPollingDequeueStrategy(
     LocalConnectionParams locaConnectionParams,
     ReceiveStrategyFactory receiveStrategyFactory, 
     IQueuePurger queuePurger, 
     SecondaryReceiveConfiguration secondaryReceiveConfiguration,
     TransportNotifications transportNotifications, 
     RepeatedFailuresOverTimeCircuitBreaker circuitBreaker)
 {
     this.locaConnectionParams = locaConnectionParams;
     this.receiveStrategyFactory = receiveStrategyFactory;
     this.queuePurger = queuePurger;
     this.secondaryReceiveConfiguration = secondaryReceiveConfiguration;
     this.transportNotifications = transportNotifications;
     this.circuitBreaker = circuitBreaker;
 }
 public SqlServerPollingDequeueStrategy(
     LocalConnectionParams locaConnectionParams,
     ReceiveStrategyFactory receiveStrategyFactory,
     IQueuePurger queuePurger,
     SecondaryReceiveConfiguration secondaryReceiveConfiguration,
     TransportNotifications transportNotifications,
     RepeatedFailuresOverTimeCircuitBreaker circuitBreaker)
 {
     this.locaConnectionParams          = locaConnectionParams;
     this.receiveStrategyFactory        = receiveStrategyFactory;
     this.queuePurger                   = queuePurger;
     this.secondaryReceiveConfiguration = secondaryReceiveConfiguration;
     this.transportNotifications        = transportNotifications;
     this.circuitBreaker                = circuitBreaker;
 }
        public RealSimulator(string address, string connectionString)
        {
            this.address = address;
            var localConnectionParams = new LocalConnectionParams(null, connectionString, "dbo");
            new SqlServerQueueCreator(new DefaultConnectionStringProvider(localConnectionParams), ConnectionFactory.Default()).CreateQueueIfNecessary(Address.Parse(address), null);

            var transportNotifications = new TransportNotifications();

            taskStarted = transportNotifications.ReceiveTaskStarted.Subscribe(x => AddMessage("Thread started"));
            taskEnded = transportNotifications.ReceiveTaskStopped.Subscribe(x => AddMessage("Thread died"));

            dequeueStrategy = new SqlServerPollingDequeueStrategy(localConnectionParams,
                new ReceiveStrategyFactory(new DummyConnectionStore(), localConnectionParams, Address.Parse("error"), ConnectionFactory.Default()),
                new QueuePurger(new SecondaryReceiveConfiguration(_ => SecondaryReceiveSettings.Disabled()), localConnectionParams, ConnectionFactory.Default()), 
                new SecondaryReceiveConfiguration(_ => SecondaryReceiveSettings.Disabled()),
                transportNotifications,
                new RepeatedFailuresOverTimeCircuitBreaker("A", TimeSpan.FromDays(1000), _ => { }));

            dequeueStrategy.Init(Address.Parse(address), new TransactionSettings(true, TimeSpan.FromMinutes(2), System.Transactions.IsolationLevel.ReadCommitted, 1, false, false),
                ProcessMessage, (message, exception) => { });

            sender = new SqlServerMessageSender(new DefaultConnectionStringProvider(localConnectionParams), new DummyConnectionStore(), new DummyCallbackAddressStore(), ConnectionFactory.Default());
        }
 public CollectionConnectionStringProvider(IEnumerable<EndpointConnectionInfo> connectionStrings, LocalConnectionParams localConnectionParams)
 {
     this.localConnectionParams = localConnectionParams;
     this.connectionStrings = connectionStrings.ToList();
 }
 public QueuePurger(SecondaryReceiveConfiguration secondaryReceiveConfiguration, LocalConnectionParams localConnectionParams, ConnectionFactory sqlConnectionFactory)
 {
     this.secondaryReceiveConfiguration = secondaryReceiveConfiguration;
     this.localConnectionParams = localConnectionParams;
     this.sqlConnectionFactory = sqlConnectionFactory;
 }
 public CollectionConnectionStringProvider(IEnumerable <EndpointConnectionInfo> connectionStrings, LocalConnectionParams localConnectionParams)
 {
     this.localConnectionParams = localConnectionParams;
     this.connectionStrings     = connectionStrings.ToList();
 }
예제 #9
0
 internal SqlServerStorageContext(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams)
 {
     this.pipelineExecutor      = pipelineExecutor;
     this.localConnectionParams = localConnectionParams;
 }
예제 #10
0
 public QueuePurger(SecondaryReceiveConfiguration secondaryReceiveConfiguration, LocalConnectionParams localConnectionParams)
 {
     this.secondaryReceiveConfiguration = secondaryReceiveConfiguration;
     this.localConnectionParams = localConnectionParams;
 }
 internal SqlServerStorageContext(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams)
 {
     this.pipelineExecutor = pipelineExecutor;
     this.localConnectionParams = localConnectionParams;
 }
 internal ConnectionParams CreateConnectionParams(LocalConnectionParams defaultConnectionParams)
 {
     return defaultConnectionParams.MakeSpecific(connectionString, schemaName);
 }
예제 #13
0
 public QueuePurger(SecondaryReceiveConfiguration secondaryReceiveConfiguration, LocalConnectionParams localConnectionParams, ConnectionFactory sqlConnectionFactory)
 {
     this.secondaryReceiveConfiguration = secondaryReceiveConfiguration;
     this.localConnectionParams         = localConnectionParams;
     this.sqlConnectionFactory          = sqlConnectionFactory;
 }
 public DelegateConnectionStringProvider(Func<string, ConnectionInfo> connectionStringProvider, LocalConnectionParams localConnectionParams)
 {
     this.connectionStringProvider = connectionStringProvider;
     this.localConnectionParams = localConnectionParams;
 }
예제 #15
0
 public QueuePurger(SecondaryReceiveConfiguration secondaryReceiveConfiguration, LocalConnectionParams localConnectionParams)
 {
     this.secondaryReceiveConfiguration = secondaryReceiveConfiguration;
     this.localConnectionParams         = localConnectionParams;
 }
 public ReceiveStrategyFactory(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams, Address errorQueueAddress)
 {
     this.pipelineExecutor = pipelineExecutor;
     this.errorQueueAddress = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
 }
 internal ConnectionParams CreateConnectionParams(LocalConnectionParams defaultConnectionParams)
 {
     return(defaultConnectionParams.MakeSpecific(connectionString, schemaName));
 }
 public DelegateConnectionStringProvider(Func <string, ConnectionInfo> connectionStringProvider, LocalConnectionParams localConnectionParams)
 {
     this.connectionStringProvider = connectionStringProvider;
     this.localConnectionParams    = localConnectionParams;
 }
 public ReceiveStrategyFactory(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams, Address errorQueueAddress)
 {
     this.pipelineExecutor      = pipelineExecutor;
     this.errorQueueAddress     = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
 }