コード例 #1
0
		/// <summary>
		/// Sets the number of concurrent receive threads that can execute simultaneously. In many cases, such as when
		/// using non-transactional transports, this can lead to very-bad-things(TM)
		/// </summary>
		/// <param name="configurator"></param>
		/// <param name="concurrentReceiverLimit"></param>
		public static void SetConcurrentReceiverLimit(this ServiceBusConfigurator configurator, int concurrentReceiverLimit)
		{
			var controlBusConfigurator =
				new PostCreateBusBuilderConfiguratorImpl(bus => { bus.ConcurrentReceiveThreads = concurrentReceiverLimit; });

			configurator.AddBusConfigurator(controlBusConfigurator);
		}
コード例 #2
0
        public static ServiceBusConfigurator UseStomp(this ServiceBusConfigurator configurator)
        {
            var busConfigurator = new PostCreateBusBuilderConfiguratorImpl(
                bus => bus.AddService(BusServiceLayer.Network, new StompSubscriptionService()));

            configurator.AddBusConfigurator(busConfigurator);
            configurator.UseJsonSerializer();

            return(configurator.AddTransportFactory <StompTransportFactory>());
        }
コード例 #3
0
        public static ServiceBusConfigurator UseStomp(this ServiceBusConfigurator configurator)
        {
            var busConfigurator = new PostCreateBusBuilderConfiguratorImpl(
                bus => bus.AddService(BusServiceLayer.Network, new StompSubscriptionService()));

            configurator.AddBusConfigurator(busConfigurator);
            configurator.UseJsonSerializer();

            return configurator.AddTransportFactory<StompTransportFactory>();
        }
コード例 #4
0
		public static void UseRabbitMqRouting(this ServiceBusConfigurator configurator)
		{
			var busConfigurator = new PostCreateBusBuilderConfiguratorImpl(bus =>
				{
					bus.RemoveLoopbackSubsciber();
					bus.InboundPipeline.Configure(x =>
						{
							x.Register(new RabbitMqSubscriptionBinder(bus.Endpoint.InboundTransport));
						});

					var interceptorConfigurator = new OutboundMessageInterceptorConfigurator(bus.OutboundPipeline);

					interceptorConfigurator.Create(new PublishEndpointInterceptor(bus));
				});

			configurator.AddBusConfigurator(busConfigurator);

			configurator.UseRabbitMq();
		}
コード例 #5
0
		/// <summary>
		/// Sets the receive timeout on the service bus endpoint receiver. Settings this to a lower value has limited
		/// benefit other than in unit testing to reduce bus disposal time
		/// </summary>
		/// <param name="configurator"></param>
		/// <param name="receiveTimeout"></param>
		public static void SetReceiveTimeout(this ServiceBusConfigurator configurator, TimeSpan receiveTimeout)
		{
			var controlBusConfigurator = new PostCreateBusBuilderConfiguratorImpl(bus => { bus.ReceiveTimeout = receiveTimeout; });

			configurator.AddBusConfigurator(controlBusConfigurator);
		}