...
Code Block |
---|
java.naming.provider.url=failover:(tcp://172.18.7.4:61616?soTimeout=60000,tcp://172.18.7.5:61616?soTimeout=60000)?randomize=false&backup=true&trackMessages=true |
You may add any number of AMQ instances you want in the failover/tcp chain. The soTimeout=60000 parameter prevents to keep too much useless connections opened. On the broker side you need to use transport.soTimeout=60000 in activemq.xml. Currently, the number of connections keep to increase. I hope to fix that soon... (see note below)
See Transport Options for details on the 2 last parameters. There is a also a link at bottom of this page if ever you need to escalate more smoothly dynamic setting of failover. But it would need more work in OFBiz...
See
Notes
If you get a "Too many open files" error. In Unix like systems, Network connections are actually backed by files descriptors. So Edit /etc/security/limits.conf to increase nofile for the users running ActiveMQ. like
...
We also increased the max number of files descriptors for root which runs ActiveMQ at startup (for now only on staging)
Some possible pitfalls
This section can be bypassed but might help in case of troubles
I first installed ActiveMQ 5.5.0 on my developement machine on XP. When I ran OFBiz I got this non blocking error
...