[
https://issues.apache.org/jira/browse/ARTEMIS-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17375842#comment-17375842
]
Apache Dev commented on ARTEMIS-3377:
-------------------------------------
Thanks [~gtully],
even using _useTopologyForLoadBalancing=false_ in the connection URL does not
change the client behaviour.
If A and B are killed at the same time, client does not reconnect to C when it
becomes Live.
I see the following workarounds to recover from this situation:
# Restart broker A and kill C --> A becomes Live and client can finally
reattach to it automatically (using reconnectAttempts=-1)
# Use only Live and Backup nodes, avoiding brokers in state "Waiting to become
backup node".
# Avoid reconnectAttempts=-1 (or setting a small number of attempts) and let
the application recreate the connection.
However this requires a partial application rewriting, as sessions/consumers
need to be recreated dinamically.
I think that using reconnectAttempts=-1 is a nice Artemis feature, and it
should guarantee session reconnection also for brokers "Waiting to become
backup node".
Instead, it seems currently possible for client to only reconnect automatically
to the "Backup Announced" node, which is a limitation expecially for the DB
Shared Storage use-case, where all brokers could be considered "peers".
> Client does not reconnect after failover when both Live and Backup brokers
> are killed
> -------------------------------------------------------------------------------------
>
> Key: ARTEMIS-3377
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3377
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.16.0
> Reporter: Apache Dev
> Priority: Major
>
> Scenario:
> * 3 brokers configured in Live/Backup with shared DB storage
> ** Broker A is "Live"
> ** Broker B is "Backup Announced"
> ** Broker C is "Waiting to become backup node"
> * Client is connected using the following HA URL:
> **
> (tcp://activemq:61616,tcp://activemq2:61616,tcp://activemq3:61616)?ha=true&reconnectAttempts=-1&initialConnectAttempts=-1&consumerWindowSize=1048576&minLargeMessageSize=2147483647
> * Both Broker A and Broker B are killed
> * Broker C becomes Live
> * Client does not reconnect to Broker C automatically even if configured
> with "reconnectAttempts=-1"
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)