Hi Torsten,

Artemis clients can be configured to automatically reconnect to the same
server[1] or the relative backup server when it takes over[2].
The `ha` parameter is just to enable the clients to reconnect to the backup
server, when it detects a connection failure with the live server[3].

AFAIK there is no parameter to automatically reconnect to other cluster
servers without High Availability[2].

[1]
https://activemq.apache.org/components/artemis/documentation/latest/client-reconnection.html
[2]
https://activemq.apache.org/components/artemis/documentation/latest/ha.html
[3]
https://activemq.apache.org/components/artemis/documentation/latest/ha.html#automatic-client-failover

Regards,
Domenico



On Sun, 6 Jun 2021 at 10:10, Thorsten Kunz <thorsten.k...@masergy.com>
wrote:

> Hi there,
>
> I have a question about reconnecting to a cluster. So my goal is if I have
> a cluster with 3 nodes A,B and C to make the Artemis client connect to A
> and if that connection dies - maybe because node A was shutdown for
> maintenance - it would reconnect to node B. If B goes down it will try to
> connect to C and if that is down it should try A again, etc. The client
> should actually try this without ever giving up.
> Now I always thought that this would be achieved with the
> "reconnectAttempts=-1" URL parameter. But I recently stumbled over
> documentation that suggested that this would only work with "ha=true" as
> well. But since I have a cluster without HA nodes I do not have that
> parameter set.
>
> So now I wonder if what I am doing is actually correct or what URL
> parameters I actually need to set to get my desired behaviour? It actually
> doesn't matter to me if the client is trying the servers round robin or
> random as long as it does actually try to reconnect indefinitely to all
> cluster members in case of failure of the current one.
>
> Thanks,
>
> Thorsten
>

Reply via email to