コード例 #1
0
        public override void PostHandleCommand(dynamic cmd, Type type, string handlerName, dynamic response, TimeSpan handleTimeSpan)
        {
            var now      = DateTime.UtcNow;
            var metaData = new Dictionary <string, object>();

            if (response != null && response.Succeeded)
            {
                metaData["Result"] = "Succeeded";
            }
            else
            {
                if (response == null || response.Error == null)
                {
                    metaData["Result"] = "Failed";
                }
                else
                {
                    metaData["Result"] = response.Error.Message;
                }
            }
            metaData["BusName"]     = this.Name;
            metaData["MsgType"]     = type.Name;
            metaData["MsgTypeId"]   = cmd.MsgTypeId;
            metaData["HandlerName"] = handlerName;
            metaData["ProcessTime"] = handleTimeSpan.TotalMilliseconds;
            metaData["ThreadId"]    = System.Threading.Thread.CurrentThread.ManagedThreadId;
            metaData["Timestamp"]   = (double)TimeoutService.EpochMsFromDateTime(now);
            //DiagnosticMonitor.WriteEventToEventStore(
            //    DiagnosticMonitor.MonitorStreamName,
            //    cmd,
            //    metaData);
        }
コード例 #2
0
ファイル: TestTimeoutService.cs プロジェクト: karmerk/Rebus
        protected override void DoSetUp()
        {
            timeoutService = new TimeoutService(new InMemoryTimeoutStorage());
            timeoutService.Start();

            handlerActivator = new HandlerActivatorForTesting();
            client = CreateBus("test.rebus.timeout.client", handlerActivator).Start(1);
        }
コード例 #3
0
ファイル: TestTimeoutService.cs プロジェクト: ssboisen/Rebus
        protected override void DoSetUp()
        {
            timeoutService = new TimeoutService(new InMemoryTimeoutStorage());
            timeoutService.Start();

            handlerActivator = new HandlerActivatorForTesting();
            client           = CreateBus("test.rebus.timeout.client", handlerActivator).Start(1);
        }
コード例 #4
0
ファイル: ModerationModule.cs プロジェクト: recatek/Durandal
 public ModerationModule(
     TimeoutService timeout,
     NameService name,
     MessageService message)
 {
     this.timeout = timeout;
     this.name    = name;
     this.message = message;
 }
コード例 #5
0
		protected override void EstablishContext()
        {
            base.EstablishContext();

            _correlationId = CombGuid.Generate();

        	_timeoutSagaRepository = SetupSagaRepository<TimeoutSaga>(ObjectBuilder);

            _timeoutService = new TimeoutService(LocalBus, _timeoutSagaRepository);
            _timeoutService.Start();
        }
コード例 #6
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            _correlationId = NewId.NextGuid();

            _timeoutSagaRepository = SetupSagaRepository<TimeoutSaga>();

            _timeoutService = new TimeoutService(LocalBus, _timeoutSagaRepository);
            _timeoutService.Start();
        }
コード例 #7
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            _correlationId = NewId.NextGuid();

            _timeoutSagaRepository = SetupSagaRepository <TimeoutSaga>();

            _timeoutService = new TimeoutService(LocalBus, _timeoutSagaRepository);
            _timeoutService.Start();
        }
コード例 #8
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            _correlationId = CombGuid.Generate();

            _timeoutSagaRepository = SetupSagaRepository <TimeoutSaga>(ObjectBuilder);

            _timeoutService = new TimeoutService(LocalBus, _timeoutSagaRepository);
            _timeoutService.Start();
        }
コード例 #9
0
ファイル: TestMessageDeferral.cs プロジェクト: ssboisen/Rebus
        protected override void DoSetUp()
        {
            handlerActivator = new HandlerActivatorForTesting();
            bus            = CreateBus("test.deferral", handlerActivator).Start(1);
            timeoutService = new TimeoutService(new InMemoryTimeoutStorage());
            timeoutService.Start();

            RebusLoggerFactory.Current = new ConsoleLoggerFactory(false)
            {
                MinLevel = LogLevel.Warn
            };
        }
コード例 #10
0
        public void Initialize(IBusFactory busFactoryToUse)
        {
            Console.WriteLine("Purging {0}, just to be sure", TimeoutService.DefaultInputQueueName);
            MsmqUtil.PurgeQueue(TimeoutService.DefaultInputQueueName);

            //var sqlServerTimeoutStorage = new SqlServerTimeoutStorage(SqlServerFixtureBase.ConnectionString, "rebus_timeouts").EnsureTableIsCreated();
            //var mongoDbTimeoutStorage = new MongoDbTimeoutStorage(MongoDbFixtureBase.ConnectionString, "timeouts");
            var inMemoryTimeoutStorage = new InMemoryTimeoutStorage();

            timeoutService = new TimeoutService(inMemoryTimeoutStorage);
            timeoutService.Start();
            busFactory = busFactoryToUse;
        }
コード例 #11
0
        public void Initialize(IBusFactory busFactoryToUse)
        {
            Console.WriteLine("Purging {0}, just to be sure", TimeoutService.DefaultInputQueueName);
            MsmqUtil.PurgeQueue(TimeoutService.DefaultInputQueueName);

            //var sqlServerTimeoutStorage = new SqlServerTimeoutStorage(SqlServerFixtureBase.ConnectionString, "rebus_timeouts").EnsureTableIsCreated();
            //var mongoDbTimeoutStorage = new MongoDbTimeoutStorage(MongoDbFixtureBase.ConnectionString, "timeouts");
            var inMemoryTimeoutStorage = new InMemoryTimeoutStorage();

            timeoutService = new TimeoutService(inMemoryTimeoutStorage);
            timeoutService.Start();
            busFactory = busFactoryToUse;
        }
コード例 #12
0
        void Configure()
        {
            var subscriptionServiceUri = new Uri("loopback://localhost/mt_subscriptions");
            var healthUri  = new Uri("loopback://localhost/mt_health");
            var timeoutUri = new Uri("loopback://localhost/mt_timeout");
            var localUri   = new Uri("loopback://localhost/local");

            _subscriptionBus = SetupServiceBus(subscriptionServiceUri,
                                               configurator => configurator.SetConcurrentConsumerLimit(1));

            var subscriptionSagas       = new InMemorySagaRepository <SubscriptionSaga>();
            var subscriptionClientSagas = new InMemorySagaRepository <SubscriptionClientSaga>();

            _subscriptionService = new SubscriptionService(_subscriptionBus, subscriptionSagas, subscriptionClientSagas);

            _subscriptionService.Start();

            _timeoutBus = SetupServiceBus(timeoutUri,
                                          configurator =>
            {
                configurator.UseControlBus();
                configurator.UseSubscriptionService(subscriptionServiceUri);
            });

            _timeoutService = new TimeoutService(_timeoutBus, new InMemorySagaRepository <TimeoutSaga>());
            _timeoutService.Start();

            Thread.Sleep(500);

            _healthBus = SetupServiceBus(healthUri,
                                         configurator =>
            {
                configurator.UseControlBus();
                configurator.UseSubscriptionService(subscriptionServiceUri);
            });

            _healthSagas   = new InMemorySagaRepository <HealthSaga>();
            _healthService = new HealthService(_healthBus, _healthSagas);
            _healthService.Start();

            Thread.Sleep(500);

            _serviceBus = SetupServiceBus(localUri, configurator =>
            {
                configurator.UseControlBus();
                configurator.UseHealthMonitoring(1);
                configurator.UseSubscriptionService(subscriptionServiceUri);
            });

            Thread.Sleep(500);
        }
コード例 #13
0
        private void Reset()
        {
            ServerInfo = new ServerInfo();

            _tcp            = new TcpClient();
            _cachedUsers    = new ConcurrentDictionary <string, User>();
            Users           = new ReadOnlyDictionary <string, User>(_cachedUsers);
            _cachedChannels = new ConcurrentDictionary <string, Channel>();
            Channels        = new ReadOnlyDictionary <string, Channel>(_cachedChannels);

            _timeout     = new TimeoutService(this);
            _tokenSource = new CancellationTokenSource();
            new Thread(() => _timeout.Run(_tokenSource.Token)).Start();
        }
コード例 #14
0
        public override void NoCommandHandler(dynamic cmd, Type type)
        {
            var metaData = new Dictionary <string, object>();

            metaData["Result"]      = "No Handler";
            metaData["BusName"]     = this.Name;
            metaData["MsgType"]     = type.Name;
            metaData["MsgTypeId"]   = cmd.MsgTypeId;
            metaData["HandlerName"] = "**None**";
            metaData["Timestamp"]   = (double)TimeoutService.EpochMsFromDateTime(DateTime.UtcNow);
            //DiagnosticMonitor.WriteEventToEventStore(
            //    DiagnosticMonitor.MonitorStreamName,
            //    cmd,
            //    metaData);
        }
コード例 #15
0
        public override void CommandReceived(dynamic cmd, Type type, string firedBy)
        {
            var metaData = new Dictionary <string, object>();

            metaData["FiredBy"]   = firedBy;
            metaData["BusName"]   = this.Name;
            metaData["MsgType"]   = type.Name;
            metaData["MsgTypeId"] = cmd.MsgTypeId;
            metaData["ThreadId"]  = System.Threading.Thread.CurrentThread.ManagedThreadId;
            metaData["Timestamp"] = (double)TimeoutService.EpochMsFromDateTime(DateTime.UtcNow);
            //DiagnosticMonitor.WriteEventToEventStore(
            //    DiagnosticMonitor.AuditStreamName,
            //    cmd,
            //    metaData);
        }
コード例 #16
0
 public override void MessageReceived(dynamic msg, Type type, string publishedBy)
 {
     var metaData = new Dictionary <string, object>
     {
         ["PublishedBy"] = publishedBy,
         ["BusName"]     = this.Name,
         ["MsgType"]     = type.Name,
         ["MsgTypeId"]   = msg.MsgTypeId,
         ["ThreadId"]    = System.Threading.Thread.CurrentThread.ManagedThreadId,
         ["Timestamp"]   = (double)TimeoutService.EpochMsFromDateTime(DateTime.UtcNow)
     };
     //DiagnosticMonitor.WriteEventToEventStore(
     //    DiagnosticMonitor.AuditStreamName,
     //    msg,
     //    metaData);
 }
コード例 #17
0
        public override void NoMessageHandler(dynamic msg, Type type)
        {
            var metaData = new Dictionary <string, object>
            {
                ["Result"]      = "No Handler",
                ["BusName"]     = this.Name,
                ["MsgType"]     = type.Name,
                ["MsgTypeId"]   = msg.MsgTypeId,
                ["HandlerName"] = "**None**",
                ["Timestamp"]   = (double)TimeoutService.EpochMsFromDateTime(DateTime.UtcNow)
            };

            //DiagnosticMonitor.WriteEventToEventStore(
            //    DiagnosticMonitor.MonitorStreamName,
            //    msg,
            //    metaData);
        }
コード例 #18
0
        /// <summary>
        ///     Creates a new <see cref="IRCClient"/>.
        /// </summary>
        public IRCClient(IRCConfiguration configuration)
        {
            DataReceived += OnDataReceived;

            _configuration = new IRCConfiguration(configuration);
            ServerInfo     = new ServerInfo();

            _tcp            = new TcpClient();
            _cachedUsers    = new ConcurrentDictionary <string, User>();
            Users           = new ReadOnlyDictionary <string, User>(_cachedUsers);
            _cachedChannels = new ConcurrentDictionary <string, Channel>();
            Channels        = new ReadOnlyDictionary <string, Channel>(_cachedChannels);

            _timeout     = new TimeoutService(this);
            _tokenSource = new CancellationTokenSource();
            new Thread(() => _timeout.Run(_tokenSource.Token)).Start();
        }
コード例 #19
0
        protected override void DoSetUp()
        {
            // this is the bus hosting the saga
            sagaHandlerActivator = new HandlerActivatorForTesting();
            sagaPersister        = new InMemorySagaPersister();
            sagaBus = CreateBus(SagaBusInputQueueName, sagaHandlerActivator, new InMemorySubscriptionStorage(), sagaPersister, "error").Start(1);

            // this is the "service bus", i.e. just some request/reply-enabled service somewhere
            serviceHandlerActivator = new HandlerActivatorForTesting();
            serviceBus = CreateBus(ServiceBusInputQueueName, serviceHandlerActivator).Start(1);

            // this is just a bus from the outside that can initiate everything
            initiatorBus = CreateBus("test.autocorrelation.initiator", new HandlerActivatorForTesting()).Start(1);

            timeoutService = new TimeoutService(new InMemoryTimeoutStorage());
            timeoutService.Start();
        }
コード例 #20
0
 public override void PostHandleMessage(dynamic msg, Type type, IMessageHandler handler, TimeSpan handleTimeSpan)
 {
     var now      = DateTime.UtcNow;
     var metaData = new Dictionary <string, object>
     {
         ["Result"]      = "Handled",
         ["BusName"]     = this.Name,
         ["MsgType"]     = type.Name,
         ["MsgTypeId"]   = msg.MsgTypeId,
         ["HandlerName"] = handler.HandlerName,
         ["ProcessTime"] = handleTimeSpan.TotalMilliseconds,
         ["ThreadId"]    = System.Threading.Thread.CurrentThread.ManagedThreadId,
         ["Timestamp"]   = (double)TimeoutService.EpochMsFromDateTime(now)
     };
     //DiagnosticMonitor.WriteEventToEventStore(
     //    DiagnosticMonitor.MonitorStreamName,
     //    msg,
     //    metaData);
 }
コード例 #21
0
		protected override void EstablishContext()
		{
			base.EstablishContext();

			_correlationId = CombGuid.Generate();

			_timeoutSagaRepository = SetupSagaRepository<TimeoutSaga>(ObjectBuilder);

			_timeoutService = new TimeoutService(RemoteBus, _timeoutSagaRepository);
			_timeoutService.Start();

			_repository = new InMemoryDeferredMessageRepository();
			ObjectBuilder.Stub(x => x.GetInstance<IDeferredMessageRepository>()).Return(_repository);
			ObjectBuilder.Stub(x => x.GetInstance<DeferMessageConsumer>()).Return(new DeferMessageConsumer(RemoteBus, _repository));
			ObjectBuilder.Stub(x => x.GetInstance<TimeoutExpiredConsumer>()).Return(new TimeoutExpiredConsumer(RemoteBus, _repository));

			_deferService = new MessageDeferralService(RemoteBus);
			_deferService.Start();
		}
コード例 #22
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            _correlationId = CombGuid.Generate();

            _timeoutSagaRepository = SetupSagaRepository <TimeoutSaga>(ObjectBuilder);

            _timeoutService = new TimeoutService(RemoteBus, _timeoutSagaRepository);
            _timeoutService.Start();

            _repository = new InMemoryDeferredMessageRepository();
            ObjectBuilder.Stub(x => x.GetInstance <IDeferredMessageRepository>()).Return(_repository);
            ObjectBuilder.Stub(x => x.GetInstance <DeferMessageConsumer>()).Return(new DeferMessageConsumer(RemoteBus, _repository));
            ObjectBuilder.Stub(x => x.GetInstance <TimeoutExpiredConsumer>()).Return(new TimeoutExpiredConsumer(RemoteBus, _repository));

            _deferService = new MessageDeferralService(RemoteBus);
            _deferService.Start();
        }
コード例 #23
0
        private void StartTimeoutService(TransportSettings settings)
        {
            //
            // setup the time out service
            //
            string subscriptionQueueUri = settings.GetQueueUri(SubscriptionServiceQueueName ?? STR_DefaultSubscriptionServiceQueueName);
            string timeoutQueueUri      = settings.GetQueueUri(TimeoutServiceQueueName ?? STR_DefaultTimeoutServiceQueueName);
            var    timeoutBus           = ServiceBusFactory.New(sbc =>
            {
                sbc.UseControlBus();

                sbc.ReceiveFrom(timeoutQueueUri);
                sbc.UseSubscriptionService(subscriptionQueueUri);
            });

            var timeoutService = new TimeoutService(timeoutBus, new InMemorySagaRepository <TimeoutSaga>());

            timeoutService.Start();
        }
コード例 #24
0
        private static void InitializeTimeoutService(ISessionFactory sessionFactory)
        {
            Console.Write("Initializing the timeout service... ");

            var timeoutBus = ServiceBusFactory.New(sbc =>
            {
                sbc.UseMsmq();
                sbc.VerifyMsmqConfiguration();
                sbc.UseControlBus();

                sbc.ReceiveFrom(Constants.QueueTimeouts);
                sbc.UseSubscriptionService(Constants.QueueSubscriptions);
            });

            var timeoutSagaRepository = new NHibernateSagaRepository<TimeoutSaga>(sessionFactory);
            var timeoutService = new TimeoutService(timeoutBus, timeoutSagaRepository);
            timeoutService.Start();

            Utils.WriteToConsole("done", ConsoleColor.Green);
        }
コード例 #25
0
        protected override void DoSetUp()
        {
            messageQueueFactory = new TFactory();

            RebusLoggerFactory.Current = new ConsoleLoggerFactory(false)
            {
                MinLevel = LogLevel.Debug,
                Filters  = { l => true }
            };

            crm   = CreateBus("crm", ContainerAdapterWith("crm"));
            caf   = CreateBus("caf", ContainerAdapterWith("caf", typeof(CheckCreditSaga)));
            legal = CreateBus("legal", ContainerAdapterWith("legal", typeof(CheckSomeLegalStuffSaga)));
            dcc   = CreateBus("dcc", ContainerAdapterWith("dcc", typeof(MaintainCustomerInformationSaga)));

            // clear saga data collections
            DropCollection(CreditSagasCollectionName);
            DropCollection(LegalSagasCollectionName);
            DropCollection(CustomerInformationSagasCollectionName);
            DropCollection(TimeoutsCollectionName);

            var timeoutServiceQueues = messageQueueFactory.GetQueue("rebus.timeout");

            timeout = new TimeoutService(new MongoDbTimeoutStorage(ConnectionString, TimeoutsCollectionName),
                                         timeoutServiceQueues.Item1,
                                         timeoutServiceQueues.Item2);
            timeout.Start();

            caf.Subscribe <CustomerCreated>();

            legal.Subscribe <CustomerCreated>();

            dcc.Subscribe <CustomerCreated>();
            dcc.Subscribe <CustomerCreditCheckComplete>();
            dcc.Subscribe <CustomerLegallyApproved>();

            Thread.Sleep(5.Seconds());
        }
コード例 #26
0
        private void StartTimeoutService(TransportSettings settings)
        {
            //
            // setup the time out service
            //
            string subscriptionQueueUri = settings.GetQueueUri(SubscriptionServiceQueueName ?? STR_DefaultSubscriptionServiceQueueName);
            string timeoutQueueUri = settings.GetQueueUri(TimeoutServiceQueueName ?? STR_DefaultTimeoutServiceQueueName);
            var timeoutBus = ServiceBusFactory.New(sbc =>
            {
                sbc.UseControlBus();

                sbc.ReceiveFrom(timeoutQueueUri);
                sbc.UseSubscriptionService(subscriptionQueueUri);
            });

            var timeoutService = new TimeoutService(timeoutBus, new InMemorySagaRepository<TimeoutSaga>());
            timeoutService.Start();
        }
コード例 #27
0
        public Given_Two_Buses_Using_SqlTransport()
        {
            var connection = new SqliteInMemoryConnection();

            //connection.Open();

            //var connectionStringResolver = new ConnectionStringResolver {ConnectionStrings = new ConnectionStringSettingsCollection {new ConnectionStringSettings("test", csSubscriptions), new ConnectionStringSettings("timeout", csTimeout)}};

            //var connectionFactory = new SqliteConnectionFactory(connection);

            //
            // setup the subscription service
            //
            SubscriptionBus = ServiceBusFactory.New(sbc =>
            {
                sbc.UseSql(cfg => cfg.UseConnection("test", connection));
                sbc.SetConcurrentConsumerLimit(1);

                sbc.ReceiveFrom("sqlite://test/mt_subscriptions");
            });

            var subscriptionSagas       = new InMemorySagaRepository <SubscriptionSaga>();
            var subscriptionClientSagas = new InMemorySagaRepository <SubscriptionClientSaga>();

            _subscriptionService = new SubscriptionService(SubscriptionBus, subscriptionSagas, subscriptionClientSagas);

            _subscriptionService.Start();

            //
            // setup the time out service
            //
            _timeoutBus = ServiceBusFactory.New(sbc =>
            {
                sbc.UseSql(cfg =>
                {
                    cfg.UseConnection("test", connection);
                    cfg.UseSubscriptionService(y => y.SetSubscriptionServiceEndpoint(new Uri("sqlite://test/mt_subscriptions")));
                });
                //sbc.SetConcurrentConsumerLimit(1);
                sbc.UseControlBus();
                sbc.ReceiveFrom("sqlite://test/mt_timeouts");
            });

            _timeoutService = new TimeoutService(_timeoutBus, new InMemorySagaRepository <TimeoutSaga>());
            _timeoutService.Start();

            OutboundBus = ServiceBusFactory.New(x =>
            {
                x.ReceiveFrom("sqlite://test/out_queue");
                x.UseControlBus();
                //x.SetPurgeOnStartup(true);

                x.UseSql(cfg =>
                {
                    cfg.UseConnection("test", connection);
                    cfg.UseSubscriptionService(y => y.SetSubscriptionServiceEndpoint(new Uri("sqlite://test/mt_subscriptions")));
                });

                x.SetCreateTransactionalQueues(false);

                //x.Subscribe(s => s.Handler<SimpleRequest>(Handle));
            });

            InboundBus = ServiceBusFactory.New(x =>
            {
                x.ReceiveFrom("sqlite://test/in_queue");
                x.UseControlBus();
                //x.SetPurgeOnStartup(true);

                x.UseSql(cfg =>
                {
                    cfg.UseConnection("test", connection);
                    cfg.UseSubscriptionService(y => y.SetSubscriptionServiceEndpoint(new Uri("sqlite://test/mt_subscriptions")));
                });

                x.SetCreateTransactionalQueues(false);

                //x.Subscribe(s => s.Handler<SimpleRequest>(Handle));
            });
        }
コード例 #28
0
ファイル: Program.cs プロジェクト: plillevold/Rebus
        static TimeoutService CreateTimeoutService()
        {
            try
            {
                var configuration = TimeoutConfigurationSection.GetSection();

                if (configuration == null)
                {
                    log.Warn(@"The timeout manager will use the MSMQ queue '{0}' as its input queue because the input queue name has not been explicitly configured.

            The timeout manager will use the in-memory timeout storage, which is NOT suitable for production use. For production use, you should use a SQL Server (e.g. a locally installed SQL Express) or another durable database.

            If you want to configure the timeout manager for production use, you can use one the following examples to get started:

            <timeout inputQueue=""rebus.timeout.input"" errorQueue=""rebus.timeout.error"" storageType=""SQL""
             connectionString=""server=.;initial catalog=RebusTimeoutManager;integrated security=sspi""
             tableName=""timeouts"" />

            to use the 'timeouts' table in the RebusTimeoutManager database to store timeouts. If the specified table does not exist, the timeout manager will try to create it automatically.

            You can also configure the timeout manager to store timeouts in MongoDB like this:

            <timeout inputQueue=""rebus.timeout.input"" errorQueue=""rebus.timeout.error"" storageType=""mongodb""
             connectionString=""mongodb://localhost/SomeDatabase""
             tableName=""timeouts"" />

            to use the 'timeouts' collection in the SomeDatabase database to store timeouts. Please don't use the collection to store anything besides Rebus' timeouts, because otherwise it might lead to unexpected behavior.",
                        TimeoutService.DefaultInputQueueName);

                    var storage = new InMemoryTimeoutStorage();
                    var timeoutService = new TimeoutService(storage);

                    return timeoutService;
                }

                EnsureIsSet(configuration.InputQueue);
                EnsureIsSet(configuration.ErrorQueue);
                EnsureIsSet(configuration.StorageType);
                EnsureIsSet(configuration.TableName);

                switch (configuration.StorageType.ToLowerInvariant())
                {
                    case "sql":
                        log.Info("Using the SQL timeout storage - the table name '{0}' will be used", configuration.TableName);
                        return
                            new TimeoutService(
                                new SqlServerTimeoutStorage(configuration.ConnectionString, configuration.TableName)
                                    .EnsureTableIsCreated(), configuration.InputQueue, configuration.ErrorQueue);

                    case "mongodb":
                        log.Info("Using the MongoDB timeout storage - the collection name '{0}' will be used",
                                 configuration.TableName);
                        return new TimeoutService(
                            new MongoDbTimeoutStorage(configuration.ConnectionString, configuration.TableName),
                            configuration.InputQueue, configuration.ErrorQueue);

                    default:
                        throw new ArgumentException(
                            string.Format("Cannot use the value '{0}' as the storage type... sorry!",
                                          configuration.StorageType));
                }
            }
            catch (Exception e)
            {
                log.Error(e, "An error occurred while attempting to configure the timeout manager");
                throw;
            }
        }
コード例 #29
0
 public void Initialize(IBusFactory busFactoryToUse)
 {
     timeoutService = new TimeoutService(new InMemoryTimeoutStorage());
     timeoutService.Start();
     busFactory = busFactoryToUse;
 }