# LeaseBasedQueueBalancer Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.leasebasedqueuebalancer/)

## LeaseBasedQueueBalancer(string, LeaseBasedQueueBalancerOptions, ILeaseProvider, IServiceProvider, ILoggerFactory, TimeProvider) {#constructor-string-orleans-configuration-leasebasedqueuebalanceroptions-orleans-39833e9c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.leasebasedqueuebalancer/constructors/constructor-string-orleans-configuration-leasebasedqueuebalanceroptions-orleans-39833e9c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/QueueBalancer/LeaseBasedQueueBalancer.cs#L35-L52)

```csharp
public LeaseBasedQueueBalancer(string name, LeaseBasedQueueBalancerOptions options, ILeaseProvider leaseProvider, IServiceProvider services, ILoggerFactory loggerFactory, TimeProvider timeProvider)
```

LeaseBasedQueueBalancer. This balancer supports queue balancing in cluster auto-scale scenarios, unexpected server failure scenarios, and tries to support ideal distribution as much as possible.

### Parameters

- `name` (`string`): The name.
- `options` (`LeaseBasedQueueBalancerOptions`): The options.
- `leaseProvider` (`ILeaseProvider`): The lease provider.
- `services` (`IServiceProvider`): The services.
- `loggerFactory` (`ILoggerFactory`): The logger factory.
- `timeProvider` (`TimeProvider`)
