How to set a Core Bridge initial wait timeout when using a Discovery Group?
davidcole Jul 1, 2010 1:04 PMWe have successfully set up a core bridge which uses a discovery-group to locate the bridged servers.
Our issue is that the bridged servers must be started first before starting the server that has the bridge configuration.
I am trying to figure out how to configure the bridge or discovery group so that on startup, the bridge will retry or wait for a timeout period before giving up and disabling the bridge. Currently, as soon as the bridge configured server is started, it will log a message, saying:
12:27:02,064 WARN [BridgeImpl] Bridge BackendCluster-MessageBridge is unable to connect to des
tination. It will be disabled.
The relevant part of our hornetq-configuration follows:
<discovery-groups> <discovery-group name="qabatch-discovery-group"> <group-address>231.6.47.47</group-address> <group-port>9886</group-port> <refresh-timeout>10000</refresh-timeout> </discovery-group> </discovery-groups> <bridges> <bridge name="BackendCluster-MessageBridge"> <queue-name>jms.queue.mplus.BridgeOutboundQueue</queue-name> <forwarding-address>jms.queue.mplus.BridgeInboundQueue</forwarding-address> <retry-interval>1000</retry-interval> <retry-interval-multiplier>1.0</retry-interval-multiplier> <reconnect-attempts>-1</reconnect-attempts> <failover-on-server-shutdown>false</failover-on-server-shutdown> <use-duplicate-detection>true</use-duplicate-detection> <confirmation-window-size>10000000</confirmation-window-size> <discovery-group-ref discovery-group-name="qabatch-discovery-group" /> <!--<connector-ref connector-name="bridge"/>--> </bridge> </bridges>
I have seen in the documentation that you can set a discovery-group-ref and discovery-initial-wait-timeout on a connection-factory within the hornetq-jms.xml similar to this:
<connection-factory name="BridgeConnectionFactory"> <discovery-group-ref discovery-group-name="qabatch-discovery-group"/> <discovery-initial-wait-timeout>3600000</discovery-initial-wait-timeout> </connection-factory>
However, this seemed to have no effect for on startup.
Could someone provide some direction on how to properly configure the bridge using a discovery-group, such that the bridge startup will wait for the servers on the other end of the bridge to be started, without disabling the bridge? Any information or direction would be a great help!
Thanks in advance,
Dave
P.S.
Attached are both of my current configuration files.
-
hornetq-jms.xml 4.1 KB
-
hornetq-configuration.xml 8.2 KB