public ConsumerConcurrencyPipelineFactory(ConcurrencyDefinition definition)
 {
     _limiter = new AsyncLimiter(definition.MaxConcurrency, definition.MaxRate, definition.RateInterval);
 }
 public static IServiceBusBuilder UseConsumerConcurrencyLimiter(this IServiceBusBuilder config, ConcurrencyDefinition definition)
 {
     config.ThrowIfNull(nameof(config));
     config.Services.AddSingleton <IConsumerConcurrencyPipelineFactory>(new ConsumerConcurrencyPipelineFactory(definition));
     return(config);
 }