/// <summary> /// Limits the number of concurrent messages consumed by the consumer, regardless of message type. /// </summary> /// <param name="configurator"></param> /// <param name="concurrentMessageLimit">The concurrent message limit for all message types for the consumer</param> /// <param name="managementEndpointConfigurator">A management endpoint configurator to support runtime adjustment</param> /// <param name="id">An identifier for the concurrency limit to allow selective adjustment</param> public static void UseConcurrentMessageLimit <TConsumer>(this IConsumerConfigurator <TConsumer> configurator, int concurrentMessageLimit, IManagementEndpointConfigurator managementEndpointConfigurator, string id = null) where TConsumer : class { if (configurator == null) { throw new ArgumentNullException(nameof(configurator)); } if (managementEndpointConfigurator == null) { throw new ArgumentNullException(nameof(managementEndpointConfigurator)); } var observer = new ConcurrencyLimitConsumerConfigurationObserver <TConsumer>(configurator, concurrentMessageLimit, id); configurator.ConnectConsumerConfigurationObserver(observer); managementEndpointConfigurator.Instance(observer.Limiter, x => { x.UseConcurrentMessageLimit(1); x.Message <SetConcurrencyLimit>(m => m.UseRetry(r => r.None())); }); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <OrderPlacedConsumer> consumerConfigurator) { endpointConfigurator.Instance(new OrderPlacedResponseConsumer()); }
public void ConsumerConfigured <TConsumer>(IConsumerConfigurator <TConsumer> configurator) where TConsumer : class { _consumerObservers.ConsumerConfigured(configurator); }
void IConsumerConfigurationObserver.ConsumerConfigured <T>(IConsumerConfigurator <T> configurator) { }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <DoItJobConsumer> consumerConfigurator) { consumerConfigurator.Options <JobOptions <DoIt> >(options => { options .SetRetry(r => { r.Interval(3, TimeSpan.FromSeconds(5)); }) .SetJobTimeout(TimeSpan.FromMinutes(10)) .SetConcurrentJobLimit(10) ; }); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <ValueConsumer> consumerConfigurator) { endpointConfigurator.UseMessageRetry(r => r.Intervals(100, 200, 500)); endpointConfigurator.UseInMemoryOutbox(); }
public DelayedRedeliveryConsumerConfigurationObserver(IConsumerConfigurator <TConsumer> configurator, Action <IRetryConfigurator> configure) { _configurator = configurator; _configure = configure; }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <SubmitCoinCapAssetConsumer> consumerConfigurator) { endpointConfigurator.UseMessageRetry(r => r.Interval(5, 1000)); endpointConfigurator.UseInMemoryOutbox(); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <UpdateCacheConsumer> consumerConfigurator) { //TODO }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <MessageConsumer> consumerConfigurator) { //((RabbitMqReceiveEndpointConfiguration)endpointConfigurator).ExchangeType = ExchangeType.Direct; base.ConfigureConsumer(endpointConfigurator, consumerConfigurator); }
public void ConsumerConfigured <TConsumer>(IConsumerConfigurator <TConsumer> configurator) where TConsumer : class { configurator.AddPipeSpecification( new FilterPipeSpecification <ConsumerConsumeContext <TConsumer> >(new LoggingFilter2 <TConsumer>())); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <SubmitOrderConsumer> consumerConfigurator) { }
void IConsumerDefinition <TConsumer> .Configure(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <TConsumer> consumerConfigurator) { }
void IConsumerConfigurationObserver.ConsumerConfigured <TConsumer>(IConsumerConfigurator <TConsumer> configurator) { _consumePipeSpecification.ConsumerConfigured(configurator); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <RoutingSlipBatchEventConsumer> consumerConfigurator) { consumerConfigurator.Options <BatchOptions>(o => o.SetMessageLimit(10).SetTimeLimit(100)); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <SubmitOrderConsumer> consumerConfigurator) { // base.ConfigureConsumer(endpointConfigurator, consumerConfigurator); endpointConfigurator.UseMessageRetry(retry => retry.Interval(3, 1000)); endpointConfigurator.UseExecute((context) => Console.WriteLine($"Consuming From Address: {context.SourceAddress}")); //consumerConfigurator.Message<SubmitOrderConsumer>(configure => //{ // // configure. //}); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <SubmitOrderConsumer> consumerConfigurator) { endpointConfigurator.UseMessageRetry(x => x.Intervals(10, 100, 500, 1000)); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <OfferConsumer> consumerConfigurator) { endpointConfigurator.UseMessageRetry(configurator => configurator.Interval(5, 1000)); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <CheckOrderStatusConsumer> consumerConfigurator) { endpointConfigurator.UseMessageRetry(r => r.Intervals(500, 1000)); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <CancelScheduledMessageConsumer> consumerConfigurator) { consumerConfigurator.Message <CancelScheduledMessage>(m => m.UsePartitioner(_endpointDefinition.Partition, p => p.Message.TokenId)); }
protected override void ConfigureConsumer( IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <UploadProvidersConsumer> consumerConfigurator) { endpointConfigurator.UseMessageRetry(r => r.Interval(3, 1000)); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <EnRouteToCustomerConsumer> consumerConfigurator) { consumerConfigurator.UseMessageRetry(r => { r.SetRetryPolicy(x => x.Immediate(_settings.MessageRetryImmediatePolicy)); }); consumerConfigurator.UseScheduledRedelivery(r => { r.SetRetryPolicy(x => x.Immediate(_settings.MessageRedeliveryImmediatePolicy)); }); consumerConfigurator.UseInMemoryOutbox(); }
void IConsumerConfigurationObserver.ConsumerConfigured <TConsumer>(IConsumerConfigurator <TConsumer> configurator) { _configurator.ConsumerConfigured(configurator); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <TestBatchConsumer> consumerConfigurator) { endpointConfigurator.UseInMemoryOutbox(); consumerConfigurator.Options <BatchOptions>(o => o.SetMessageLimit(5).SetTimeLimit(2000)); }
protected override void ConfigureConsumer( IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <CustomerChangedConsumer> consumerConfigurator) { consumerConfigurator.UseInMemoryOutbox(); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <SubmitOrderConsumer> consumerConfigurator) { //endpointConfigurator.DiscardFaultedMessages(); //endpointConfigurator.DiscardSkippedMessages(); endpointConfigurator.UseMessageRetry(r => r.Interval(3, 1000)); endpointConfigurator.UseInMemoryOutbox(); }
public void ConsumerConfigured <TConsumer>(IConsumerConfigurator <TConsumer> configurator) where TConsumer : class { _busEndpointConfiguration.Consume.Configurator.ConsumerConfigured(configurator); }
public ConcurrencyLimitConsumerConfigurationObserver(IConsumerConfigurator <TConsumer> configurator, int concurrentMessageLimit, string id = null) { _configurator = configurator; Limiter = new ConcurrencyLimiter(concurrentMessageLimit, id); }
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator <DiscoveryPingConsumer> consumerConfigurator) { }
public void ConsumerConfigured <TConsumer>(IConsumerConfigurator <TConsumer> configurator) where TConsumer : class { }