Skip to content

DeploymentBasedQueueBalancer Methods

DeploymentBasedQueueBalancer is a stream queue balancer that uses deployment information to help balance queue distribution. DeploymentBasedQueueBalancer uses the deployment configuration to determine how many silos to expect and uses a silo status oracle to determine which of the silos are available. With this information it tries to balance the queues using a best fit resource balancing algorithm.

Create(IServiceProvider, string, IDeploymentConfiguration)

static
View source
public static IStreamQueueBalancer Create(IServiceProvider services, string name, IDeploymentConfiguration deploymentConfiguration)
Creates a deployment-based queue balancer.

Parameters

servicesIServiceProvider
The service provider.
namestring
The stream provider name.
deploymentConfigurationIDeploymentConfiguration
The deployment configuration.

Returns

The queue balancer.

GetMyQueues

override
View source
public override IEnumerable<QueueId> GetMyQueues()
Retrieves the latest queue distribution for this balancer.

Returns

Queue allocated to this balancer.

Initialize(IStreamQueueMapper)

override
View source
public override Task Initialize(IStreamQueueMapper queueMapper)
Initializes this instance.

Parameters

queueMapperIStreamQueueMapper
The queue mapper.

Returns

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