Hi Team,

Recently I tried to configure Core Bridge to transfer messages from one local 
queue to another queue on other Artemis cluster.
There were problems when creating bridge configuration. Broker did not start 
because some options in bridge section were invalid.

For example, I created Artemis instance with default settings and added 
following sections to broker.xml:

     <connectors>
        <connector 
name="server1-connector">tcp://server1:61616?minLargeMessageSize=1024000;call-timeout=30000</connector>
        <connector 
name="server2-connector">tcp://server2:61616?minLargeMessageSize=1024000;call-timeout=30000</connector>
    </connectors>

    <bridges>
        <bridge name="test-bridge">
            <queue-name>TEST.Q</queue-name>
            <forwarding-address>TEST.Q</forwarding-address>
            <user>username</user>
            <password>password</password>
            <static-connectors>
                <connector-ref>server1-connector</connector-ref>
                <connector-ref>server2-connector</connector-ref>
            </static-connectors>
        </bridge>
    </bridges>

I also added anycast address TEST.Q with queue TEST.Q.
Server1 and server2 are two servers of the destination cluster, configured in 
primary/standby mode.

This was working example. Core bridge successfully started and messages from 
local TEST.Q were transferred to remote TEST.Q.
When I tried to add any other options to bridge section, for example - ha, 
retry-interval, or other documented options - it caused errors when reloading 
configuration or restarting broker.

There are also undocumented parameters which are mentioned in error log 
message, for example "reconnect-attempts-same-node". It is documented only in 
configuration index 
https://activemq.apache.org/components/artemis/documentation/latest/configuration-index.html
 (does not exists in 
https://activemq.apache.org/components/artemis/documentation/latest/core-bridges.html),
 it may be a documentation issue.
Version of Artemis is 2.31.2.

This is an example of exception which happens during configuration reload when 
I try to add "ha" parameter:

2024-01-30 16:03:17,730 ERROR 
[org.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser] 
cvc-complex-type.2.4.a: Invalid content was found starting with element 
'{"urn:activemq:core":ha}'. One of 
'{"urn:activemq:core":reconnect-attempts-same-node, 
"urn:activemq:core":routing-type, "urn:activemq:core":concurrency, 
"urn:activemq:core":static-connectors, 
"urn:activemq:core":discovery-group-ref}' is expected.
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was 
found starting with element '{"urn:activemq:core":ha}'. One of 
'{"urn:activemq:core":reconnect-attempts-same-node, 
"urn:activemq:core":routing-type, "urn:activemq:core":concurrency, 
"urn:activemq:core":static-connectors, 
"urn:activemq:core":discovery-group-ref}' is expected.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:511)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3587)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1971)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:276)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:243)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:189)
 ~[?:?]
        at 
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:108)
 ~[?:?]
        at javax.xml.validation.Validator.validate(Validator.java:124) ~[?:?]
        at 
org.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser.parseMainConfig(FileConfigurationParser.java:378)
 ~[artemis-server-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.reloadConfigurationFile(ActiveMQServerImpl.java:4562)
 ~[artemis-server-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.lambda$initialisePart1$9(ActiveMQServerImpl.java:3343)
 ~[artemis-server-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.reload.ReloadManagerImpl$ReloadRegistry.check(ReloadManagerImpl.java:127)
 ~[artemis-server-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.reload.ReloadManagerImpl.tick(ReloadManagerImpl.java:68)
 ~[artemis-server-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.reload.ReloadManagerImpl.run(ReloadManagerImpl.java:49)
 ~[artemis-server-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent.runForExecutor(ActiveMQScheduledComponent.java:314)
 ~[artemis-commons-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent.lambda$bookedRunForScheduler$2(ActiveMQScheduledComponent.java:321)
 ~[artemis-commons-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:57)
 ~[artemis-commons-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:32)
 ~[artemis-commons-2.31.2.jar:2.31.2]
        at 
org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68)
 ~[artemis-commons-2.31.2.jar:2.31.2]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
[?:?]
        at 
org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
 [artemis-commons-2.31.2.jar:2.31.2]

If it is a bug, I can create JIRA issue.

--
Best regards,
Aleksandr


-----------------------------------

This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. AO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed.

-----------------------------------

Reply via email to