/// <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); }
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>()); }
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>(); }
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(); }
/// <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); }