Hello,
let’s say we have a HA cluster with one primary and one backup node.
Configuration is straight forward:
<connectors>
<connector name="artemis-primary">tcp://primaryA:61616</connector>
<connector name="artemis-backup">tcp://backupB:61616</connector>
</connectors>
Since we want to use this cluster with external AMQP clients we have configured
standard 5672 port with just that protocol and exposed it through the firewall.
Port 61616 is used just to form a cluster. For security reasons it is
unavailable to external clients.
<acceptors>
<acceptor
name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true;supportAdvisory=false;suppressInternalManagementObjects=false</acceptor>
<acceptor
name="amqp">tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true</acceptor>
</acceptors>
We also have one more acceptor for SSL connections on port 5671 for these
external clients, but for simplicity I omitted it. The problem can be repeated
on standard plaintext AMQP.
In Qpid JMS client we use the following connection URL:
failover:(amqp://primaryA:5672,amqp://backupB:5672)
Under normal circumstances this works, but if we do a broker failover, or if we
(for testing reason) kill network reachability of primary node, Qpid client
then tries to connect to amqp://backupB:616161 instead of port 5672. When
debugging I see that this port comes as a part of AMQP “open” frame which then
replaces client’s connection URL.
As a workaround I found amqpOpenServerListAction=IGNORE transport option.
However, this means that we would have to update hundreds of our Qpid JMS
clients we don’t really control with a new connection URL.
Is there a way to send a correct broker topology port from the broker side
without changes to the clients?
I remembered that Artemis has
https://artemis.apache.org/components/artemis/documentation/latest/ha.html#use-client-connectors-to-fail-over
but I assume this works only for Core clients? Or maybe it works with Artemis
JMS client?
--
Best Regards,
Vilius Šumskas
Rivile
IT manager