[
https://issues.apache.org/jira/browse/ARTEMIS-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17479542#comment-17479542
]
Gary Tully commented on ARTEMIS-3640:
-------------------------------------
I have been peeking at the code, to see where and how a replacement would
happen and it looks like there is an existing bit of configuration on a cluster
connection that can suffice.
With the above connectors, use a cluster connection as follows to explicity set
the connector-ref that will be used in topology updates:
{code}
<cluster-connection name=...>
....
<connector-ref>artemis-master:PUBLISHED_AS</connector-ref>
<static-connectors>
<connector-ref>artemis-master</connector-ref>
</static-connectors>
</cluster-connection>
{code}
I wonder if that is sufficient? May be there is no need for any special
postfix. A sanity check in one of the unit tests suggests that this may work
just fine.
> external clients cannot use cluster topology for HA or load balancing
> ---------------------------------------------------------------------
>
> Key: ARTEMIS-3640
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3640
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Vilius Šumskas
> Assignee: Gary Tully
> Priority: Major
>
> Let's say there is a simple Artemis HA master/slave shared storage cluster
> with such configuration:
>
> {noformat}
> <connectors>
> <connector
> name="artemis-master">tcp://internal-cluster-dns-1:61616</connector>
> <connector
> name="artemis-slave">tcp://internal-cluster-dns-2:61616</connector>
> </connectors>
> {noformat}
> The cluster is using static discovery.
>
> Factory on internal clients are using:
> {noformat}
> (tcp://internal-cluster-dns-1:61616,tcp://internal-cluster-dns-2:61616)?ha=true&reconnectAttempts=30&useTopologyForLoadBalancing=false{noformat}
> Those internal clients can successfully connect to the cluster and failover
> works as expected.
>
> However if there is also external clients which use external DNS/IP address
> of the cluster the topology doesn't return correct DNS name and the failover
> fails.
> {noformat}
> (tcp://external-cluster-dns-1:61616,tcp://external-cluster-dns-2:61616)?ha=true&reconnectAttempts=30&useTopologyForLoadBalancing=false{noformat}
> {noformat}
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector:
> AMQ214033: Cannot resolve host java.net.UnknownHostException:
> internal-cluster-dns-1{noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)