Issues with ActiveMQ 3.8.3 (CPP) priorityBackup not working

361 Views Asked by At

I am a little new to active MQ so please bear with me.

I am trying to take advantage of the ActiveMQ priority backup feature for some of my Java and CPP applications. I have two brokers on two different servers (local and remote), and I want the following behavior for my apps.

  1. Always connect to local broker on startup
  2. If local broker goes down, connect to remote
  3. While connected to remote, if local comes back up, we then reconnect to local.

I have had success with testing it on the java apps by simply adding priorityBackup to my uri options i.e. failover:(tcp://local:61616,tcp://remote:61616)?randomize=false&priorityBackup=true

However stuff isn't going as smoothly on the CPP side.

The following works fine on the CPP apps (with basic working failover functionality - aka jumping to remote when local goes down )

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

But updating the uri options with priorityBackup seems to break failover functionality completely (my apps never failover to the remote broker, they just stay in some kind of broker-less/limbo state when their local broker goes down) failover:(tcp://local:61616,tcp://remote:61616)?randomize=false&priorityBackup=true

Is there anything I am missing here? Extra uri options that I should have included?

UPDATE: Transport connector info

<transportConnectors>
            <transportConnector name="ClientOpenwire" uri="tcp://0.0.0.0:61616?wireFormat.maxInactivityDuration=7000"/>
            <transportConnector name="Broker2BrokerOpenwire" uri="tcp://0.0.0.0:62627?wireFormat.maxInactivityDuration=5000"/>
            <transportConnector name="stompConnector" uri="stomp://0.0.0.0:62623"/>
</transportConnectors>
1

There are 1 best solutions below

1
On

backup and priorityBackup parameters are handled in completely different way in Java and C++ implementation of the library. Java implementation works well but unfortunately C++ implementation is broken. There are no extra options that can fix this issue. Serious changes in library are required to resolve this issue.

I was testing this issue using activemq-cpp-library-3.8.3, and brokers in various versions (5.10.0, 5.11.1). Issue is not fixed in 3.8.4 release.