Liam
Liam

Reputation: 493

Apache ActiveMQ ignoring randomize=false and other parameters

I am currently using NMS (C#), and I provide it with three server addresses with a priority server with the expectation for it to connect to the 2nd or 3rd server when the main is offline and then re-connect with the main server once back online.

The servers are third-party hosted whereas I'm developing the client.

I am using the following nugets:

Connection string:

failover:(tcp://mainServer:61619,tcp://backup1:61619,tcp://backup2:61619)?randomize=false&timeout=10000&backup=true&priorityBackup=true&useExponentialBackOff=true&reconnectDelayExponent=2.0&initialReconnectDelay=5000&initialReconnectDelay=180000&consumerExpiryCheckEnabled=false

I'm providing it with randomize=false but yet it is still selecting a server a random and it does not seem to set the useExponentialBackOff either.

I have also tried nested.randomize=false

Upvotes: 0

Views: 98

Answers (1)

Tim Bish
Tim Bish

Reputation: 18356

The NMS.ActiveMQ client is different than the Java client in that URI options require prefixes in order for the parser to figure out how to apply them. For the failover options the prefix is "transport." e.g "transport.randomize=false". This is documented on the website for the NMS.ActiveMQ client here.

To my recollection the NMS.ActiveMQ client doesn't support the priority backup options (and they aren't on the site) so that probably won't work as you are expecting it to.

Upvotes: 1

Related Questions