Example #1
0
 public Server(ILog log, Settings settings, IEndpointFactory endpointFactory, IThreadManager threadManager)
 {
     this.log = log;
     this.settings = settings;
     this.endpointFactory = endpointFactory;
     this.threadManager = threadManager;
 }
Example #2
0
        public ServiceInstance(string name, IEndpointFactory endpointFactory, string subscriptionServiceEndpointAddress, Action <IObjectBuilder> configureBuilder, Action <IServiceBusConfigurator> configurator)
        {
            ObjectBuilder = MockRepository.GenerateMock <IObjectBuilder>();
            ObjectBuilder.Stub(x => x.GetInstance <IEndpointFactory>()).Return(endpointFactory);

            configureBuilder(ObjectBuilder);

            ControlBus = ControlBusConfigurator.New(x =>
            {
                x.SetObjectBuilder(ObjectBuilder);
                x.ReceiveFrom(name + "_control");

                x.PurgeBeforeStarting();
            });

            DataBus = ServiceBusConfigurator.New(x =>
            {
                x.SetObjectBuilder(ObjectBuilder);
                x.ConfigureService <SubscriptionClientConfigurator>(y =>
                {
                    // setup endpoint
                    y.SetSubscriptionServiceEndpoint(subscriptionServiceEndpointAddress);
                });
                x.ReceiveFrom(name);
                x.UseControlBus(ControlBus);
                x.SetConcurrentConsumerLimit(5);

                configurator(x);
            });
        }
 public void Dispose()
 {
     _pipeline        = null;
     _bus             = null;
     _service         = null;
     _endpointFactory = null;
 }
Example #4
0
        private static void Main()
        {
            /////setup
            XmlConfigurator.ConfigureAndWatch(new FileInfo("log4net.xml"));

            WindsorContainer c  = new DefaultMassTransitContainer();
            IEndpointFactory ef = EndpointFactoryConfigurator.New(e => e.RegisterTransport <MsmqEndpoint>());

            c.Kernel.AddComponentInstance("endpointFactory", typeof(IEndpointFactory), ef);
            c.AddComponent <SimpleMessageHandler>();
            c.AddComponentLifeStyle("counter", typeof(Counter), LifestyleType.Singleton);
            c.AddComponentLifeStyle("rvaoeuaoe", typeof(CacheUpdateResponseHandler), LifestyleType.Transient);

            IServiceBus bus = ServiceBusConfigurator.New(b =>
            {
                b.ReceiveFrom("msmq://localhost/mt_client");
                b.ConfigureService <SubscriptionClientConfigurator>(sc => sc.SetSubscriptionServiceEndpoint("msmq://localhost/mt_subscriptions"));
                b.ConfigureService <HealthClientConfigurator>(hc => hc.SetHeartbeatInterval(10));
            });

            c.Kernel.AddComponentInstance("bus", typeof(IServiceBus), bus);

            bus.Subscribe <CacheUpdateResponseHandler>();
            bus.Subscribe <SimpleMessageHandler>();

            IEndpoint ep            = c.Resolve <IEndpointFactory>().GetEndpoint(new Uri("msmq://localhost/mt_subscriptions"));
            var       subTester     = new SubscriptionServiceTester(ep, bus, c.Resolve <Counter>());
            var       healthTester  = new HealthServiceTester(c.Resolve <Counter>(), bus);
            var       timeoutTester = new TimeoutTester(bus);

            bus.Subscribe(healthTester);
            ///////


            Console.WriteLine("Please enter the number of hours you would like this test to run for?");
            Console.WriteLine("(use 0.1 for 6 minutes)");
            Console.WriteLine("(use 0.016 for 1 minute)");
            string   input    = Console.ReadLine();
            double   hours    = double.Parse(input ?? "0");
            DateTime stopTime = DateTime.Now.AddHours(hours);


            Console.WriteLine("Test Started");
            var rand = new Random();

            while (DateTime.Now < stopTime)
            {
                subTester.Test();
                healthTester.Test();
                timeoutTester.Test();

                Thread.Sleep(rand.Next(5, 10) * 1000);
                PrintTime(bus, c.Resolve <Counter>());
            }

            //print final stuff (probably do this by tester)
            subTester.Results();
            Console.WriteLine("Done (press any key to exit)");
            Console.ReadKey(true);
        }
Example #5
0
        /// <summary>
        /// Creates an instance of the ServiceBus, which implements IServiceBus. This is normally
        /// not called and should be created using the ServiceBusConfigurator to ensure proper defaults
        /// and operation.
        /// </summary>
        public ServiceBus(IEndpoint endpointToListenOn,
                          IObjectBuilder objectBuilder,
                          IEndpointFactory endpointFactory)
        {
            ReceiveTimeout = TimeSpan.FromSeconds(3);
            endpointToListenOn.MustNotBeNull("endpointToListenOn", "This parameter cannot be null");
            objectBuilder.MustNotBeNull("objectBuilder", "This parameter cannot be null");
            endpointFactory.MustNotBeNull("endpointFactory", "This parameter cannot be null");

            Endpoint        = endpointToListenOn;
            ObjectBuilder   = objectBuilder;
            EndpointFactory = endpointFactory;

            _eventAggregator      = PipeSegment.New();
            _eventAggregatorScope = _eventAggregator.NewSubscriptionScope();

            _serviceContainer = new ServiceContainer(this);

            OutboundPipeline = MessagePipelineConfigurator.CreateDefault(ObjectBuilder, this);

            InboundPipeline = MessagePipelineConfigurator.CreateDefault(ObjectBuilder, this);
            InboundPipeline.Configure(x => { _unsubscribeEventDispatchers += x.Register(new InboundOutboundSubscriptionBinder(OutboundPipeline, Endpoint)); });

            PoisonEndpoint = new PoisonEndpointDecorator(new NullEndpoint());

            ControlBus = this;

            InitializePerformanceCounters();
        }
Example #6
0
		public ServiceInstance(string name, IEndpointFactory endpointFactory, string subscriptionServiceEndpointAddress, Action<IObjectBuilder> configureBuilder, Action<IServiceBusConfigurator> configurator)
		{
			ObjectBuilder = MockRepository.GenerateMock<IObjectBuilder>();
			ObjectBuilder.Stub(x => x.GetInstance<IEndpointFactory>()).Return(endpointFactory);

			configureBuilder(ObjectBuilder);

			ControlBus = ControlBusConfigurator.New(x =>
				{
					x.SetObjectBuilder(ObjectBuilder);
					x.ReceiveFrom(name + "_control");

					x.PurgeBeforeStarting();
				});

			DataBus = ServiceBusConfigurator.New(x =>
				{
					x.SetObjectBuilder(ObjectBuilder);
					x.ConfigureService<SubscriptionClientConfigurator>(y =>
						{
							// setup endpoint
							y.SetSubscriptionServiceEndpoint(subscriptionServiceEndpointAddress);
						});
					x.ReceiveFrom(name);
					x.UseControlBus(ControlBus);
					x.SetConcurrentConsumerLimit(5);

					configurator(x);
				});
		}
Example #7
0
		public TestGridNode(string name, IEndpointFactory endpointFactory, string subscriptionServiceEndpointAddress, Action<GridConfigurator> configureGrid)
		{
			ObjectBuilder = MockRepository.GenerateMock<IObjectBuilder>();
			ObjectBuilder.Stub(x => x.GetInstance<IEndpointFactory>()).Return(endpointFactory);

			ControlBus = ControlBusConfigurator.New(x =>
				{
					x.SetObjectBuilder(ObjectBuilder);
					x.ReceiveFrom(name + "_control");

					x.PurgeBeforeStarting();
				});

			SetupGridNodeRepository();
			SetupGridServiceRepository();
			SetupGridServiceNodeRepository();
			SetupGridMessageNodeRepository();
			SetupGridListenerRepository();
			SetupGridAcceptorRepository();

			DataBus = ServiceBusConfigurator.New(x =>
				{
					x.SetObjectBuilder(ObjectBuilder);
					x.ConfigureService<SubscriptionClientConfigurator>(y =>
						{
							// setup endpoint
							y.SetSubscriptionServiceEndpoint(subscriptionServiceEndpointAddress);
						});
					x.ReceiveFrom(name);
					x.UseControlBus(ControlBus);
					x.SetConcurrentConsumerLimit(4);

					x.ConfigureService(configureGrid);
				});
		}
 public TfsSharedQueryProcessor(ProcessorEnricherContainer processorEnrichers,
                                IEndpointFactory endpointFactory,
                                IServiceProvider services,
                                ITelemetryLogger telemetry,
                                ILogger <Processor> logger)
     : base(processorEnrichers, endpointFactory, services, telemetry, logger)
 {
 }
        public DistributedTaskController(IServiceBus bus, IEndpointFactory endpointFactory, TTask distributedTask)
        {
            _bus             = bus;
            _endpointFactory = endpointFactory;
            _distributedTask = distributedTask;

            _taskId = Guid.NewGuid();
        }
 public WorkItemTrackingProcessor(
     ProcessorEnricherContainer processorEnricherContainer,
     IEndpointFactory endpointFactory,
     IServiceProvider services,
     ITelemetryLogger telemetry,
     ILogger <Processor> logger)
     : base(processorEnricherContainer, endpointFactory, services, telemetry, logger)
 {
 }
Example #11
0
        public void Should_throw_an_endpoint_exception_from_the_endpoint_factory()
        {
            IEndpointFactory ef = EndpointFactoryConfigurator.New(x =>
            {
                x.RegisterTransport <MsmqEndpoint>();
            });

            ef.GetEndpoint(_uri);
        }
Example #12
0
        public static async Task <IEndpoint> GetEndpoint(this IEndpointFactory endpointFactory,
                                                         EndpointIdentity endpointIdentity)
        {
            var endpoints = await endpointFactory.GetEndpointsAsync(EnumerableHelper.From(endpointIdentity));

            var endpoint = endpoints.Single();

            return(endpoint);
        }
Example #13
0
 public TfsAreaAndIterationProcessor(
     ProcessorEnricherContainer processorEnrichers,
     IEndpointFactory endpointFactory,
     IServiceProvider services,
     ITelemetryLogger telemetry,
     ILogger <Processor> logger)
     : base(processorEnrichers, endpointFactory, services, telemetry, logger)
 {
 }
 public void SetUp()
 {
     _endpointFactory = EndpointFactoryConfigurator.New(c =>
     {
         c.RegisterTransport <TEndpoint>();
         c.SetObjectBuilder(ObjectBuilder);
     });
     _ep = _endpointFactory.GetEndpoint(Address);
 }
Example #15
0
 public AzureDevOpsPipelineProcessor(
     ProcessorEnricherContainer processorEnrichers,
     IEndpointFactory endpointFactory,
     IServiceProvider services,
     ITelemetryLogger telemetry,
     ILogger <Processor> logger)
     : base(processorEnrichers, endpointFactory, services, telemetry, logger)
 {
 }
Example #16
0
 public AnalysisService(
     IEndpointFactory endpointFactory,
     IEndpointDefinitionFactory endpointDefinitionFactory,
     IEndpointCache endpointCache)
 {
     _endpointFactory           = endpointFactory;
     _endpointDefinitionFactory = endpointDefinitionFactory;
     _endpointCache             = endpointCache;
 }
 public TfsTeamDashboardsProcessor(ProcessorEnricherContainer processorEnrichers,
                                   IMigrationEngine engine,
                                   IEndpointFactory endpointFactory,
                                   IServiceProvider services,
                                   ITelemetryLogger telemetry,
                                   ILogger <Processor> logger)
     : base(processorEnrichers, endpointFactory, services, telemetry, logger)
 {
     Engine = engine;
 }
 public TfsAreaAndIterationProcessor(
     TfsNodeStructure tfsNodeStructure,
     ProcessorEnricherContainer processorEnrichers,
     IEndpointFactory endpointFactory,
     IServiceProvider services,
     ITelemetryLogger telemetry,
     ILogger <Processor> logger)
     : base(processorEnrichers, endpointFactory, services, telemetry, logger)
 {
     _nodeStructureEnricher = tfsNodeStructure;
 }
 public ProcessDefinitionProcessor(
     ProcessorEnricherContainer processorEnrichers,
     IEndpointFactory endpointFactory,
     IServiceProvider services,
     ITelemetryLogger telemetry,
     ILogger <Processor> logger)
     : base(processorEnrichers, endpointFactory, services, telemetry, logger)
 {
     SourceModel = new ProcessorModel();
     TargetModel = new ProcessorModel();
 }
Example #20
0
 public MainPageController(
     IAnalysisService analysisService,
     IEndpointFactory endpointFactory,
     IInvocationService invocationService,
     IEndpointCache endpointCache)
 {
     _analysisService   = analysisService;
     _endpointFactory   = endpointFactory;
     _invocationService = invocationService;
     _endpointCache     = endpointCache;
 }
 public SubscriptionService(IServiceBus bus,
                            ISubscriptionRepository subscriptionRepository,
                            IEndpointFactory endpointFactory,
                            ISagaRepository <SubscriptionSaga> subscriptionSagas,
                            ISagaRepository <SubscriptionClientSaga> subscriptionClientSagas)
 {
     _bus                     = bus;
     _repository              = subscriptionRepository;
     _endpointFactory         = endpointFactory;
     _subscriptionSagas       = subscriptionSagas;
     _subscriptionClientSagas = subscriptionClientSagas;
 }
Example #22
0
 protected override void Before_each()
 {
     _builder  = MockRepository.GenerateMock <IObjectBuilder>();
     _resolver = EndpointFactoryConfigurator.New(x =>
     {
         x.SetObjectBuilder(_builder);
         x.SetDefaultSerializer <XmlMessageSerializer>();
         x.RegisterTransport <LoopbackEndpoint>();
     });
     _endpoint = _resolver.GetEndpoint(new Uri("loopback://localhost/servicebus"));
     _bus      = new ServiceBus(_endpoint, _builder, _resolver);
     _bus.Start();
 }
Example #23
0
        IEndpointCache CreateEndpointCache()
        {
            if (_settings.EndpointCache != null)
            {
                return(_settings.EndpointCache);
            }

            IEndpointFactory endpointFactory = CreateEndpointFactory();

            IEndpointCache endpointCache = new EndpointCache(endpointFactory);

            return(endpointCache);
        }
Example #24
0
 public Processor(
     ProcessorEnricherContainer processorEnrichers,
     IEndpointFactory endpointFactory,
     IServiceProvider services,
     ITelemetryLogger telemetry,
     ILogger <Processor> logger)
 {
     Services           = services;
     Telemetry          = telemetry;
     Log                = logger;
     ProcessorEnrichers = processorEnrichers;
     _endpointFactory   = endpointFactory;
 }
        public override BusTestScenario Build()
        {
            IEndpointFactory endpointFactory = BuildEndpointFactory();

            var scenario = new BusTestScenarioImpl(endpointFactory);

            _configurator.ChangeSettings(x => { x.EndpointCache = scenario.EndpointCache; });
            _configurator.EnableMessageTracing();

            scenario.Bus = _configurator.CreateServiceBus();

            return(scenario);
        }
Example #26
0
        public override LocalRemoteTestScenario Build()
        {
            IEndpointFactory endpointFactory = BuildEndpointFactory();

            var scenario = new LocalRemoteTestScenarioImpl(endpointFactory);

            BuildLocalBus(scenario);
            BuildRemoteBus(scenario);

            _localLoopback.SetTargetCoordinator(_remoteLoopback.Router);
            _remoteLoopback.SetTargetCoordinator(_localLoopback.Router);

            return(scenario);
        }
 public void AddEndpointFactory(IEndpointFactory factory)
 {
     lock (this)
     {
         foreach (IEndpointFactory f in _endpointFactories)
         {
             if (f.Type() == factory.Type())
             {
                 Debug.Assert(false);
             }
         }
         _endpointFactories.Add(factory);
     }
 }
Example #28
0
        protected override void Before_each()
        {
            _builder = MockRepository.GenerateMock <IObjectBuilder>();
            _builder.Stub(x => x.GetInstance <XmlMessageSerializer>()).Return(new XmlMessageSerializer());
            _endpointResolver = EndpointFactoryConfigurator.New(x =>
            {
                x.SetObjectBuilder(_builder);
                x.RegisterTransport <LoopbackEndpoint>();
            });

            _mockEndpoint = _endpointResolver.GetEndpoint(queueUri);

            _subscription = new Subscription(typeof(PingMessage), queueUri);
            _serviceBus   = new ServiceBus(_mockEndpoint, _builder, _endpointResolver);
        }
Example #29
0
        public void FirstTestName()
        {
            IServiceBusConfigurator configurator = MockRepository.GenerateMock <IServiceBusConfigurator>();

            configurator.Expect(x => x.AddService <Distributor <InitiateSimpleSaga> >(null)).IgnoreArguments();
            configurator.Expect(x => x.AddService <Distributor <CompleteSimpleSaga> >(null)).IgnoreArguments();
            configurator.Expect(x => x.AddService <Distributor <ObservableSagaMessage> >(null)).IgnoreArguments();

            IEndpointFactory endpointFactory = MockRepository.GenerateMock <IEndpointFactory>();

            ;
            configurator.UseSagaDistributorFor <TestSaga>(endpointFactory);

            configurator.VerifyAllExpectations();
        }
    	protected override void Before_each()
        {
            _builder = MockRepository.GenerateMock<IObjectBuilder>();
        	_builder.Stub(x => x.GetInstance<XmlMessageSerializer>()).Return(new XmlMessageSerializer());
			_endpointResolver = EndpointFactoryConfigurator.New(x =>
			{
				x.SetObjectBuilder(_builder);
				x.RegisterTransport<LoopbackEndpoint>();
			});

            _mockEndpoint = _endpointResolver.GetEndpoint(queueUri);

            _subscription = new Subscription(typeof (PingMessage), queueUri);
        	_serviceBus = new ServiceBus(_mockEndpoint, _builder, _endpointResolver);
        }
Example #31
0
        private static void Main(string[] args)
        {
            _log.Info("Server Loading");

            var cfg = RunnerConfigurator.New(c =>
            {
                c.SetServiceName("SampleClientService");
                c.SetDisplayName("SampleClientService");
                c.SetDescription("SampleClientService");
                c.DependencyOnMsmq();
                c.RunAsLocalSystem();


                c.ConfigureService <ClientService>(typeof(ClientService).Name, s =>
                {
                    s.WhenStarted(o =>
                    {
                        var bus = ServiceBusConfigurator.New(servicesBus =>
                        {
                            servicesBus.ReceiveFrom("msmq://localhost/mt_client");
                            servicesBus.ConfigureService <SubscriptionClientConfigurator>(client =>
                            {
                                // need to add the ability to read from configuratino settings somehow
                                client.SetSubscriptionServiceEndpoint("msmq://localhost/mt_subscriptions");
                            });
                        });

                        o.Start(bus);
                    });
                    s.WhenStopped(o => o.Stop());
                    s.CreateServiceLocator(() =>
                    {
                        var container = new DefaultMassTransitContainer();
                        IEndpointFactory endpointFactory = EndpointFactoryConfigurator.New(e =>
                        {
                            e.SetObjectBuilder(ServiceLocator.Current.GetInstance <IObjectBuilder>());
                            e.RegisterTransport <MsmqEndpoint>();
                        });
                        container.Kernel.AddComponentInstance("endpointFactory", typeof(IEndpointFactory), endpointFactory);
                        container.AddComponent <ClientService>(typeof(ClientService).Name);
                        container.AddComponent <PasswordUpdater>();
                        return(ServiceLocator.Current);                                                //set in the DefaultMTContainer
                    });
                });
            });

            Runner.Host(cfg, args);
        }
Example #32
0
 protected override void Before_each()
 {
     _builder         = MockRepository.GenerateMock <IObjectBuilder>();
     _endpointFactory = EndpointFactoryConfigurator.New(x =>
     {
         x.SetObjectBuilder(_builder);
         x.SetDefaultSerializer <XmlMessageSerializer>();
         x.RegisterTransport <LoopbackEndpoint>();
     });
     _builder.Stub(x => x.GetInstance <IEndpointFactory>()).Return(_endpointFactory);
     _bus = ServiceBusConfigurator.New(x =>
     {
         x.SetObjectBuilder(_builder);
         x.ReceiveFrom("loopback://localhost/servicebus");
     });
 }
Example #33
0
        private static void Main(string[] args)
        {
            _log.Info("subscription_mgr Loading...");

            Console.WriteLine("MSMQ Subscription Service");
            var cfg = RunnerConfigurator.New(c =>
            {
                c.SetServiceName("subscription_mgr");
                c.SetDisplayName("Subscription Service");
                c.SetDescription("Coordinates subscriptions between multiple systems");
                c.DependencyOnMsmq();
                c.RunAsLocalSystem();

                c.BeforeStartingServices(s =>
                {
                    var container = new DefaultMassTransitContainer();

                    IEndpointFactory endpointFactory = EndpointFactoryConfigurator.New(e =>
                    {
                        e.SetObjectBuilder(container.Resolve <IObjectBuilder>());
                        e.RegisterTransport <MsmqEndpoint>();
                    });
                    container.Kernel.AddComponentInstance("endpointFactory", typeof(IEndpointFactory), endpointFactory);


                    _wob = new WindsorObjectBuilder(container.Kernel);
                    ServiceLocator.SetLocatorProvider(() => _wob);
                });

                c.ConfigureService <SubscriptionService>(ConfigureSubscriptionService);

                c.ConfigureService <TimeoutService>(ConfigureTimeoutService);

                c.ConfigureService <HealthService>(ConfigureHealthService);
            });

            try
            {
                Runner.Host(cfg, args);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error trying to run service: " + ex);
                Console.WriteLine("Press any key to continue...");
                Console.ReadKey();
            }
        }
Example #34
0
		public void Setup()
		{
			_serviceId = Guid.NewGuid();
			_leaderId = Guid.NewGuid();

			_endpoint = MockRepository.GenerateMock<IEndpoint>();
			_endpoint.Expect(x => x.Send<Promise<string>>(null)).IgnoreArguments();
			_endpoint.Stub(x => x.Uri).Return(new Uri("loopback://localhost/queue"));

			_endpointFactory = MockRepository.GenerateMock<IEndpointFactory>();
			_endpointFactory.Stub(x => x.GetEndpoint((Uri)null)).IgnoreArguments().Return(_endpoint);

			_builder = MockRepository.GenerateMock<IObjectBuilder>();
			_builder.Stub(x => x.GetInstance<IEndpointFactory>()).Return(_endpointFactory);

			_bus = MockRepository.GenerateMock<IServiceBus>();
			_bus.Stub(x => x.Endpoint).Return(_endpoint);
		}
Example #35
0
        private static void Main(string[] args)
        {
            XmlConfigurator.ConfigureAndWatch(new FileInfo("server.log4net.xml"));
            _log.Info("Server Loading");

            IRunConfiguration cfg = RunnerConfigurator.New(c =>
            {
                c.SetServiceName("SampleService");
                c.SetServiceName("Sample Service");
                c.SetServiceName("Something");
                c.DependencyOnMsmq();

                c.RunAsLocalSystem();

                c.ConfigureService <PasswordUpdateService>(typeof(PasswordUpdateService).Name, s =>
                {
                    s.WhenStarted(o =>
                    {
                        IServiceBus bus = ServiceBusConfigurator.New(x =>
                        {
                            x.ReceiveFrom("msmq://localhost/mt_server");
                            x.ConfigureService <SubscriptionClientConfigurator>(b => { b.SetSubscriptionServiceEndpoint("msmq://localhost/mt_subscriptions"); });
                        });
                        o.Start(bus);
                    });
                    s.WhenStopped(o => o.Stop());
                    s.CreateServiceLocator(() =>
                    {
                        var container = new DefaultMassTransitContainer();
                        IEndpointFactory endpointFactory = EndpointFactoryConfigurator
                                                           .New(x =>
                        {
                            x.SetObjectBuilder(ServiceLocator.Current.GetInstance <IObjectBuilder>());
                            x.RegisterTransport <MsmqEndpoint>();
                        });
                        container.Kernel.AddComponentInstance("endpointFactory", typeof(IEndpointFactory), endpointFactory);
                        container.AddComponent <PasswordUpdateService>(typeof(PasswordUpdateService).Name);
                        return(ServiceLocator.Current);                                                //set in DefaultMTContainer
                    });
                });
            });

            Runner.Host(cfg, args);
        }
		public EndpointTestScenarioImpl(IEndpointFactory endpointFactory)
		{
			_received = new ReceivedMessageListImpl();
			_sent = new SentMessageListImpl();
			_skipped = new ReceivedMessageListImpl();

			_endpoints = new Dictionary<Uri, EndpointTestDecorator>();

			EndpointFactory = new EndpointFactoryTestDecorator(endpointFactory, this);

			_endpointCache = new EndpointCache(EndpointFactory);

			EndpointCache = new EndpointCacheProxy(_endpointCache);

			ServiceBusFactory.ConfigureDefaultSettings(x =>
				{
					x.SetEndpointCache(EndpointCache);
					x.SetConcurrentConsumerLimit(4);
					x.SetConcurrentReceiverLimit(1);
					x.SetReceiveTimeout(50.Milliseconds());
					x.EnableAutoStart();
				});
		}
		public LocalRemoteTestScenarioImpl(IEndpointFactory endpointFactory)
			: base(endpointFactory)
		{
		}
		public BusTestScenarioImpl(IEndpointFactory endpointFactory)
			: base(endpointFactory)
		{
		}
Example #39
0
		public EndpointCache(IEndpointFactory endpointFactory)
		{
			_endpointFactory = endpointFactory;

			_endpoints = new ReaderWriterLockedDictionary<Uri, IEndpoint>();
		}
 public void Initialize(IEndpointFactory endpointFactory, EndpointDefinition endpointDefinition) { }
Example #41
0
 public RoutingService(IList<Func<IServiceBus, IEndpointFactory, UnsubscribeAction>> routes, IEndpointFactory factory)
 {
     _routes = routes;
     _factory = factory;
 }
		public EndpointFactoryTestDecorator(IEndpointFactory endpointFactory, EndpointTestScenarioImpl testContext)
		{
			_endpointFactory = endpointFactory;
			_testContext = testContext;
		}
Example #43
0
        public EndpointCache(IEndpointFactory endpointFactory)
        {
            _endpointFactory = endpointFactory;

            _endpoints = new ConcurrentCache<Uri, IEndpoint>();
        }