コード例 #1
0
 public ReceiveStrategyFactory(IConnectionStore connectionStore, LocalConnectionParams localConnectionParams, Address errorQueueAddress, ConnectionFactory sqlConnectionFactory)
 {
     this.connectionStore = connectionStore;
     this.errorQueueAddress = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
     this.sqlConnectionFactory = sqlConnectionFactory;
 }
コード例 #2
0
 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;
 }
コード例 #5
0
        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();
 }
コード例 #7
0
 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;
 }
コード例 #11
0
 internal SqlServerStorageContext(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams)
 {
     this.pipelineExecutor = pipelineExecutor;
     this.localConnectionParams = localConnectionParams;
 }
コード例 #12
0
 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;
 }
コード例 #16
0
 public ReceiveStrategyFactory(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams, Address errorQueueAddress)
 {
     this.pipelineExecutor = pipelineExecutor;
     this.errorQueueAddress = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
 }
コード例 #17
0
 internal ConnectionParams CreateConnectionParams(LocalConnectionParams defaultConnectionParams)
 {
     return(defaultConnectionParams.MakeSpecific(connectionString, schemaName));
 }
 public DelegateConnectionStringProvider(Func <string, ConnectionInfo> connectionStringProvider, LocalConnectionParams localConnectionParams)
 {
     this.connectionStringProvider = connectionStringProvider;
     this.localConnectionParams    = localConnectionParams;
 }
コード例 #19
0
 public ReceiveStrategyFactory(PipelineExecutor pipelineExecutor, LocalConnectionParams localConnectionParams, Address errorQueueAddress)
 {
     this.pipelineExecutor      = pipelineExecutor;
     this.errorQueueAddress     = errorQueueAddress;
     this.localConnectionParams = localConnectionParams;
 }