Need A-MQ discovery transport with fabric network broker transport for reliable client reconnect.
Issue
- We are using A-MQ with full-mesh network of brokers, with two master slave pairs. I'm trying to determine the best transport options to apply to my transport URL to support my use case.Before switching to A-MQ we were using ActiveMQ with the following failover url
failover:(tcp://HOST01:61616,tcp://HOST02:61616)?startupMaxReconnectAttempts=2
- We would like our application to be able to startup successfully even if A-MQ is unavailable. We used these settings because our client application connects to A-MQ at application start time. Adding startupMaxReconnectAttempts=3 enables us to try connecting three times at start up and then give up. Otherwise it tries to connect indefinitely, and the client application never starts. We have the ability to restart the connection after startup if it gave up connecting.
Second, once we have a connection we want the application to retry connecting indefinitely if the connection is lost. - My question is, how do you do this with discovery:(fabric:amqloadbalancedev) as the
startupMaxReconnectAttempts parameter doesn't appear to be an option for the discovery transport according to these docs.http://activemq.apache.org/discovery-transport-reference.html - That said, I've tried the following URL with startupMaxReconnectAttempts and it appears to do what I want, but is this by design or a fluke as it's not in the documentation? What is your recommendation? This appears to work if both the fabric cluster is down, and if the fabric is up but the A-MQ child containers are down.
discovery:(fabric:amqloadbalancedev)?reconnectDelay=5000&startupMaxReconnectAttempts=3
Environment
- Red Hat JBoss A-MQ
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
