Test broker connection retries and retry-interval and reconnect-attempts
Main:
created a broker with command:
$ amq-broker-7.8.0/bin/artemis create main --user admin --password admin --allow-anonymous
added to the config:
Replica:
created a broker with command:
$ artemis create --user admin --password admin --allow-anonymous ~/replica
added to the config:
tcp://0.0.0.0:6700?autoStart=true;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true
shutdown replica broker and on main broker logs you can see 5 tries on every 10 seconds. After the 5th try it stopped to try to connect to replica.
2020-12-04 12:09:08,918 WARN [org.apache.activemq.artemis.core.client] AMQ212037: Connection failure to 10.0.134.16/10.0.134.16:6700 has been detected: Connection being recreated [code=GENERIC_EXCEPTION]
2020-12-04 12:09:08,920 INFO [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111002:
*******************************************************************************************************************************
Retrying Server AMQP Connection DRSite on 10.0.134.16:6700 retry 1 of 5
*******************************************************************************************************************************
2020-12-04 12:09:18,924 INFO [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111002:
*******************************************************************************************************************************
Retrying Server AMQP Connection DRSite on 10.0.134.16:6700 retry 2 of 5
*******************************************************************************************************************************
2020-12-04 12:09:28,928 INFO [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111002:
*******************************************************************************************************************************
Retrying Server AMQP Connection DRSite on 10.0.134.16:6700 retry 3 of 5
*******************************************************************************************************************************
2020-12-04 12:09:38,931 INFO [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111002:
*******************************************************************************************************************************
Retrying Server AMQP Connection DRSite on 10.0.134.16:6700 retry 4 of 5
*******************************************************************************************************************************
2020-12-04 12:09:48,935 INFO [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111002:
*******************************************************************************************************************************
Retrying Server AMQP Connection DRSite on 10.0.134.16:6700 retry 5 of 5
*******************************************************************************************************************************
2020-12-04 12:09:58,938 WARN [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111001:
*******************************************************************************************************************************
Could not re-establish AMQP Server Connection DRSite on 10.0.134.16:6700 after 5 retries
*******************************************************************************************************************************