public WebsiteRegistry()
        {
            Channel(x => x.Website).ReadIncoming();
            Channel(x => x.Service).AcceptsMessagesInAssemblyContainingType <ServiceApplication>();

            HealthMonitoring.ScheduledExecution(ScheduledExecution.Disabled);
        }
        public void Startup(bool monitoringEnabled, ISubscriptionPersistence persistence)
        {
            AlterSettings <LightningQueueSettings>(x => x.DisableIfNoChannels = true);

            Services(_ => _sources.Each(_.AddService <IPersistentTaskSource>));
            Services(_ => _.ReplaceService(persistence));
            HealthMonitoring
            .ScheduledExecution(monitoringEnabled ? ScheduledExecution.WaitUntilInterval : ScheduledExecution.Disabled)
            .IntervalSeed(3);

            _runtime = FubuTransport.For(this).StructureMap().Bootstrap();
            var controller = _runtime.Factory.Get <IPersistentTaskController>();

            _initialTasks.Each(subject => {
                controller.TakeOwnership(subject).Wait(1.Seconds());
            });
        }
 public ServiceRegistry()
 {
     Channel(x => x.Service).ReadIncoming();
     HealthMonitoring.ScheduledExecution(ScheduledExecution.Disabled);
 }