You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "Jayakumarindran Thanakodi (Jira)" <ji...@apache.org> on 2026/10/15 21:34:00 UTC

[jira] [Created] (ARTEMIS-6308) Core federation: an address-policy's max-hops and a stream's share-connection are never read from broker.xml

Jayakumarindran Thanakodi created ARTEMIS-6308:
--------------------------------------------------

             Summary: Core federation: an address-policy's max-hops and a stream's share-connection are never read from broker.xml
                 Key: ARTEMIS-6308
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-6308
             Project: Artemis
          Issue Type: Bug
          Components: Federation
    Affects Versions: 2.57.0
            Reporter: Jayakumarindran Thanakodi


{\{FileConfigurationParser.getAddressPolicy}} reads the hops from an attribute named \{{max-consumers}} (FileConfigurationParser.java:2900):

{code:java}
if (item.getNodeName().equals("max-consumers")) {
   config.setMaxHops(MINUS_ONE_OR_GE_ZERO.validate(item.getNodeName(), Integer.parseInt(item.getNodeValue())).intValue());
}
{code}

The schema declares \{{max-hops}} on \{{addressPolicyType}} (artemis-configuration.xsd:1906), and has no \{{max-consumers}} there. So \{{max-hops}} is accepted and ignored, and \{{max-consumers}} fails schema validation, which \{{artemis run}} treats as fatal. As a result, an address policy from broker.xml always has \{{maxHops = 0}}: its remote queues get the filter \{{_AMQ_Hops IS NULL OR _AMQ_Hops<0}}, so a message that has crossed one federation is never federated again, whatever \{{max-hops}} says.

In the same way, \{{getFederationStream}} (FileConfigurationParser.java:2958) never reads the \{{share-connection}} element that \{{streamType}} declares (artemis-configuration.xsd:1735). A downstream therefore never shares an upstream's connection.

Fix: read \{{max-hops}} in \{{getAddressPolicy}}, and \{{share-connection}} in \{{getFederationStream}} (\{{config.getConnectionConfiguration().setShareConnection(getBoolean(upstreamNode, "share-connection", false))}}).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org