Skip to content

ARTEMIS-6004 Add clientFailoverAdvertisingEnabled configuration to not send failover server list info to AMQP clients - #6614

Open
KalCramer wants to merge 1 commit into
apache:mainfrom
KalCramer:amqp_failover_list_flag
Open

ARTEMIS-6004 Add clientFailoverAdvertisingEnabled configuration to not send failover server list info to AMQP clients#6614
KalCramer wants to merge 1 commit into
apache:mainfrom
KalCramer:amqp_failover_list_flag

Conversation

@KalCramer

Copy link
Copy Markdown

Description

Add a clientFailoverAdvertisingEnabled connector property to control whether a backup connector is advertised to clients as part of the AMQP failover topology.

Currently, Artemis can advertise the backup connector from the broker's internal cluster topology to AMQP clients. This can cause clients using different internal and external DNS names or ports to receive an unreachable failover endpoint.

For example, an external Qpid JMS client may initially connect using:

amqp://primary.example.com:5672

but receive the internal backup connector from the broker topology:

amqp://backup.internal:61616

The client can then attempt to use the advertised endpoint instead of the endpoint configured by the client.

This is the scenario described in ARTEMIS-6004.

Changes

  • Add the clientFailoverAdvertisingEnabled connector property.
  • Default the property to true to preserve existing behavior.
  • When set to false, the backup connector is not included in the AMQP failover information advertised to clients.
  • The connector remains available for internal broker/cluster use; this change only controls client failover advertisement.
  • Add unit tests covering:
    • failover advertising enabled
    • failover advertising disabled
    • default behavior
    • SSL-enabled failover URIs

Testing

The change was tested with a Java Qpid JMS client using an Artemis HA live/backup configuration where the broker's internal cluster topology uses different hostnames/ports from those exposed to external clients.

With:

clientFailoverAdvertisingEnabled=false

the broker no longer advertises the internal backup connector to the AMQP client.

As a result, external clients no longer need to configure:

failover.amqpOpenServerListAction=IGNORE

to prevent Qpid JMS from replacing their configured failover endpoints with the broker-provided topology.

This provides a broker-side solution for clients that cannot be configured with failover.amqpOpenServerListAction=IGNORE.

@KalCramer
KalCramer force-pushed the amqp_failover_list_flag branch from 847191b to 0900aed Compare August 13, 2026 17:43
TopologyMemberImpl member = clusterConnection.getTopology().getMember(server.getNodeID().toString());
if (member != null) {
return member.toBackupURI();
TransportConfiguration backupConnector = member.getBackup();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this here seems off if you intend as you've said above for this to be a more generic option applicable to other protocols besides AMQP. Having to copy this code block around for any other implementation that needs it is sub optimal and likely error prone. Seems as though this code should live elsewhere so that it can be called here or in other protocols implementations to check if the connector is to be advertised.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this fix is specific for AMQP. I could see making this naming AMQP specific if that make it more obvious for now. No matter what there won't be a single spot for all protocols unless an abstraction is specifically made for this but I don't think this is something all protocols support so I wouldn't think that makes sense but let me know if that would stop this getting merged. Core might be only other protocol that I know of that might use this but I could be wrong.

…t send failover server list info to AMQP clients
@KalCramer
KalCramer force-pushed the amqp_failover_list_flag branch from 0900aed to c5021dd Compare August 18, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants