From d10ce9f95f81de3d8158bc648ff93a885cbf1285 Mon Sep 17 00:00:00 2001 From: Nate Chadwick <263952448+natechadwick-intsof@users.noreply.github.com> Date: Tue, 8 Sep 2026 13:46:49 -0400 Subject: [PATCH] fix(activemq): two XSD-namespace-correct element bugs from T2.2 PR #166 After PR #208/#209 restored the xmlns on (so the XSD loads), the post-T2.12 default DocumentBuilderFactory keeps validating and catches the next layer of T2.2 element-name bugs in the same file: SAXParseException; lineNumber: 61; columnNumber: 68; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://activemq.apache.org/schema/core":constantPendingMessageLimit}'. One of '{"http://activemq.apache.org/schema/core":fileQueueCursor, "http://activemq.apache.org/schema/core":storeCursor, "http://activemq.apache.org/schema/core":vmQueueCursor, WC[##other:"http://activemq.apache.org/schema/core"]}' is expected. The T2.2 PR mixed up two superficially similar ActiveMQ policy mechanisms that do very different things: T2.2 wrote XSD expects What it controls --------------- ---------------------- ------------------- (parent) cap on count per consumer limit="1000"/> attribute selects the queue cursor (fileQueueCursor / storeCursor / vmQueueCursor) -- i.e., how pending messages are *stored*, not how many are kept. The XSD's wildcard on that element does NOT allow because the element is in the same ActiveMQ namespace, not a different one. Hence "Invalid content was found starting with element constantPendingMessageLimit." Fix: replace the wrong parent/child pair with the correct XSD-valid / pair, and use the `limit` attribute (not `value`). The "cap pending message count per queue" intent of the original T2.2 block is preserved. This PR also pulls in the #208 fix (xmlns on + the explanatory comment). The #208 PR (#209) is still open and is superseded by this one; it can be closed without merging. Refs #208, #210 > Co-Authored by Mavis Mavis-Code using MiniMax-M3 with agent mavis. --- .../jetty/defaults/etc/activemq/activemq.xml | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/system/Tools/jetty/defaults/etc/activemq/activemq.xml b/system/Tools/jetty/defaults/etc/activemq/activemq.xml index e06acc975..fafc0b1b9 100644 --- a/system/Tools/jetty/defaults/etc/activemq/activemq.xml +++ b/system/Tools/jetty/defaults/etc/activemq/activemq.xml @@ -22,7 +22,19 @@ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/ac uri="tcp://127.0.0.1:61616" .../> (DO NOT use 0.0.0.0) and a matching TLS connector. --> + - - - + producer cannot exhaust the queue store. + + ActiveMQ has two superficially similar policy + elements that do very different things: + - selects the queue + cursor (fileQueueCursor / storeCursor / + vmQueueCursor) — i.e., how pending messages + are *stored*. It is NOT a cap on count. + - is the cap on + count per consumer, and its constant-form + child is + with a 'limit' attribute (not 'value'). + The original T2.2 PR used the first pair, which + the activemq.xsd rejects. Tracked in issue #210. --> + + +