EasyNetQ icon indicating copy to clipboard operation
EasyNetQ copied to clipboard

Random Hosts Selection

Open marceloodiniz opened this issue 6 years ago • 5 comments

Until version 5.6.0, we have an documented option to register connection to multiple servers on a cluster, using "Random Hosts Selection".

var bus = RabbitHutch.CreateBus("host=myfirsthost,mysecondhost", x => x.Register<IClusterHostSelectionStrategy<ConnectionFactoryInfo>, RandomClusterHostSelectionStrategy<ConnectionFactoryInfo>>());

https://github.com/EasyNetQ/EasyNetQ/wiki/Cluster-Support#mirroring

On version 6.2.0, it's not supported anymore. What's the alternative?

marceloodiniz avatar Nov 19 '20 12:11 marceloodiniz

Until version 5.6.0, we have an documented option to register connection to multiple servers on a cluster, using "Random Hosts Selection".

var bus = RabbitHutch.CreateBus("host=myfirsthost,mysecondhost", x => x.Register<IClusterHostSelectionStrategy<ConnectionFactoryInfo>, RandomClusterHostSelectionStrategy<ConnectionFactoryInfo>>());

https://github.com/EasyNetQ/EasyNetQ/wiki/Cluster-Support#mirroring

On version 6.2.0, it's not supported anymore. What's the alternative?

Hi @marceloodiniz,

Now it's random by default. EasyNetQ uses built-in cluster support included in RabbitMQ.Client.

Pliner avatar Nov 19 '20 12:11 Pliner

It looks like this page is needed to be fully rewritten. I'm going to do it right now.

Pliner avatar Nov 19 '20 12:11 Pliner

I've updated docs https://github.com/EasyNetQ/EasyNetQ/wiki/Cluster-Support as well as release notes of v6.

Pliner avatar Nov 27 '20 09:11 Pliner

Here's an example log record showing one node failing then EasyNetQ connecting to the other node and recreating the subscribers.

@Pliner Where is example?

sungam3r avatar Nov 27 '20 20:11 sungam3r

Here's an example log record showing one node failing then EasyNetQ connecting to the other node and recreating the subscribers.

@Pliner Where is example?

Thanks, I've removed this from the docs.

Pliner avatar Nov 27 '20 20:11 Pliner