Skip to main content
Version: 3.x

IConsumerThrottlingMetricConfigurationBuilder.AddMetric method

Configures the metric used for throttling the consumer. The factory function takes an instance of IDependencyResolver, allowing you to resolve dependencies required to create an instance of IConsumerThrottlingMetric.

public IConsumerThrottlingMetricConfigurationBuilder AddMetric(
Func<IDependencyResolver, IConsumerThrottlingMetric> factory)
parameterdescription
factoryA factory function that accepts an IDependencyResolver and returns an IConsumerThrottlingMetric.

Return Value

The IConsumerThrottlingMetricConfigurationBuilder for method chaining.

See Also