# DeploymentBasedQueueBalancer Methods

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

## Create(IServiceProvider, string, IDeploymentConfiguration) {#create-system-iserviceprovider-string-orleans-streams-ideploymentconfiguration-ce6e0638}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.deploymentbasedqueuebalancer/methods/create-system-iserviceprovider-string-orleans-streams-ideploymentconfiguration-ce6e0638/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/QueueBalancer/DeploymentBasedQueueBalancer.cs#L57-L58)

```csharp
public static IStreamQueueBalancer Create(IServiceProvider services, string name, IDeploymentConfiguration deploymentConfiguration)
```

### Parameters

- `services` (`IServiceProvider`)
- `name` (`string`)
- `deploymentConfiguration` (`IDeploymentConfiguration`)

## GetMyQueues {#getmyqueues-ec4fd391}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.deploymentbasedqueuebalancer/methods/getmyqueues-ec4fd391/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/QueueBalancer/DeploymentBasedQueueBalancer.cs#L88-L105)

```csharp
public override IEnumerable<QueueId> GetMyQueues()
```

Retrieves the latest queue distribution for this balancer.

### Returns

Queue allocated to this balancer.

## Initialize(IStreamQueueMapper) {#initialize-orleans-streams-istreamqueuemapper-e4c4e3c4}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.deploymentbasedqueuebalancer/methods/initialize-orleans-streams-istreamqueuemapper-e4c4e3c4/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/QueueBalancer/DeploymentBasedQueueBalancer.cs#L63-L69)

```csharp
public override Task Initialize(IStreamQueueMapper queueMapper)
```

Initializes this instance.

### Parameters

- `queueMapper` (`IStreamQueueMapper`): The queue mapper.

### Returns

A `System.Threading.Tasks.Task` representing the operation.
