Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-1597

initialReconnectDelay not enforced on duplex network bridge

XMLWordPrintable

    • Workaround Exists
    • Hide

      Configuring the network bridge with duplex="false" seems to workaround the bug and initialReconnectDelay is enforced.

      Show
      Configuring the network bridge with duplex="false" seems to workaround the bug and initialReconnectDelay is enforced.
    • Hide

      Establish a network bridge between two brokers using above config.
      Shut down the target broker, observe logging.

      Show
      Establish a network bridge between two brokers using above config. Shut down the target broker, observe logging.

      configuring the network connector with an initialReconnectDelay as in this example

      <networkConnector uri="static:(tcp://otherHost:61616)?initialReconnectDelay=2500&amp;useExponentialBackOff=false&amp;maxReconnectDelay=5000" 
          duplex="true" 
          name="test-node-mac-hub-network-connection" 
          userName="admin" 
          password="admin" />
      

      the initialReconnectDelay is not enforced when the network bridge dies.
      E.g. I get this logging

      2016-03-23 10:02:48,592  INFO | Stopping network bridge on shutdown of remote broker
      2016-03-23 10:02:48,594  WARN | Network connection between vm://localhost#0 and tcp:///192.168.178.36:61616@63232 shutdown due to a remote error: java.io.IOException: ShutdownInfo {commandId = 5, responseRequired = false}
      2016-03-23 10:02:48,595  INFO | Establishing network connection from vm://localhost?async=false&network=true to tcp://192.168.178.36:61616      <----------------
      2016-03-23 10:02:48,599  INFO | localhost Shutting down
      2016-03-23 10:02:48,599  INFO | localhost bridge to localhost stopped
      2016-03-23 10:02:48,601  INFO | localhost bridge to Unknown stopped
      2016-03-23 10:02:48,601  INFO | Connector vm://localhost stopped
      2016-03-23 10:02:48,601  WARN | Could not start network bridge between: vm://localhost?async=false&network=true and: tcp://192.168.178.36:61616 due to: java.net.ConnectException: Connection refused
      2016-03-23 10:02:48,617 DEBUG | Failure occurred soon after the discovery event was generated.  It will be classified as a connection failure: [tcp://192.168.178.36:61616, failed:true, connectionFailures:0]
      2016-03-23 10:02:48,618 DEBUG | Waiting 2500 ms before attempting to reconnect.
      2016-03-23 10:02:51,121  INFO | Establishing network connection from vm://localhost?async=false&network=true to tcp://192.168.178.36:61616
      

      Note the timing of events, in particular the time between these two lines:

      2016-03-23 10:02:48,594  WARN | Network connection between ...
      2016-03-23 10:02:48,595  INFO | Establishing network connection 
      

      The broker tries to reconnect within one millisecond.
      Subsequent reconnects correctly wait for initialReconnectDelay before retrying.

            tbish@redhat.com Timothy Bish (Inactive)
            rhn-support-tmielke Torsten Mielke
            Jiri Daněk Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: