Does priorityBackup will override he auto-rebalance setting?

Solution Verified - Updated -

Environment

  • Fuse Message Broker 5.5.X

Issue

Does priorityBackup will override he auto-rebalance setting?

I’d like to set up my brokers so that they always try to connect to the first broker in the failover list using the following settings:

failover:(my brokers)randomize=false&priorityBackup=true

Resolution

With "rebalanceClusterClients=true" on the transport connector, connected clients will be asked to rebalance across a cluster of brokers when a new broker joins the network of brokers. However, when priorityBackup=true is specified on the consumer side, it will override this request.

Consider the following connection string:

failover:(tcp://local:61616,tcp://remote:61616)?randomize=false&priorityBackup=true

In this example, the client will try to connect to the local broker. If the local broker fails, the client will move to the remote broker, however, as priorityBackup is enabled, it will constantly try to reconnect to the local broker. Once it can, the client will reconnect to the local broker automatically.

By default, only the first url in the list is considered prioritized, local. You my have multiple priority url's by configuring the the priorityURIs parameter:

failover:(tcp://local1:61616,tcp://local2:61616,tcp://remote:61616)?randomize=false&priorityBackup=true&priorityURIs=tcp://local1:61616,tcp://local2:61616

In this case the client will prioritize either local1 or local2 brokers and (re)connect to them if they are available.

Note there is an existing bug ENTMQ-268 in this area of the code. The bug has been fixed in released as of the Fuse Enterprise 7.1 Rollup Patch 1 version.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.