ActiveMQ Artemis桥接配置报告配置无效。

huangapple go评论58阅读模式
英文:

ActiveMQ Artemis bridge configuration reports invalid configuration

问题

我尝试在两个节点之间设置一个简单的桥接。我在服务器上设置了以下桥接配置:

<bridge name="myBridge">
  <queue-name>jms.topic.my.special.queue</queue-name>
  <reconnect-attempts>-1</reconnect-attempts>
  <static-connectors>
    <connector-ref>kit1-connector1</connector-ref>
    <connector-ref>kit2-connector1</connector-ref>
    <connector-ref>kit3-connector1</connector-ref>
  </static-connectors>
</bridge>

然后,在启动时我收到以下错误:

Caused by: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: 找到元素'{ "urn:activemq:core":bridge}' 的开头,其内容无效。期望其中之一的内容为'{ "urn:activemq:core":system-property-prefix, "urn:activemq:core":internal-naming-prefix, "urn:activemq:core":amqp-use-core-subscription-naming, "urn:activemq:core":resolve-protocols, ...

对于配置的问题有什么想法吗?我正在运行ActiveMQ Artemis 2.29.0。

英文:

So I attempted to setup a simple bridge between two nodes. I have the following bridge config setup on my server:

        &lt;bridge name=&quot;myBridge&quot;&gt;
          &lt;queue-name&gt;jms.topic.my.special.queue&lt;/queue-name&gt;
          &lt;reconnect-attempts&gt;-1&lt;/reconnect-attempts&gt;
          &lt;static-connectors&gt;
            &lt;connector-ref&gt;kit1-connector1&lt;/connector-ref&gt;
            &lt;connector-ref&gt;kit2-connector1&lt;/connector-ref&gt;
            &lt;connector-ref&gt;kit3-connector1&lt;/connector-ref&gt;
          &lt;/static-connectors&gt;
        &lt;/bridge&gt;

I then get the following error on startup.

Caused by: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element &#39;{&quot;urn:activemq:core&quot;:bridge}&#39;. One of &#39;{&quot;urn:activemq:core&quot;:system-property-prefix, &quot;urn:activemq:core&quot;:internal-naming-prefix, &quot;urn:activemq:core&quot;:amqp-use-core-subscription-naming, &quot;urn:activemq:core&quot;:resolve-protocols, &quot;urn:activemq:core&quot;:scheduled-thread-pool-max-size, &quot;urn:activemq:core&quot;:thread-pool-max-size, &quot;urn:activemq:core&quot;:graceful-shutdown-enabled, &quot;urn:activemq:core&quot;:graceful-shutdown-timeout, &quot;urn:activemq:core&quot;:security-enabled, &quot;urn:activemq:core&quot;:security-invalidation-interval, &quot;urn:activemq:core&quot;:authentication-cache-size, &quot;urn:activemq:core&quot;:authorization-cache-size, &quot;urn:activemq:core&quot;:journal-lock-acquisition-timeout, &quot;urn:activemq:core&quot;:wild-card-routing-enabled, &quot;urn:activemq:core&quot;:management-address, &quot;urn:activemq:core&quot;:management-notification-address, &quot;urn:activemq:core&quot;:cluster-user, &quot;urn:activemq:core&quot;:cluster-password, &quot;urn:activemq:core&quot;:password-codec, &quot;urn:activemq:core&quot;:mask-password, &quot;urn:activemq:core&quot;:log-delegate-factory-class-name, &quot;urn:activemq:core&quot;:jmx-management-enabled, &quot;urn:activemq:core&quot;:jmx-domain, &quot;urn:activemq:core&quot;:jmx-use-broker-name, &quot;urn:activemq:core&quot;:message-counter-enabled, &quot;urn:activemq:core&quot;:message-counter-sample-period, &quot;urn:activemq:core&quot;:message-counter-max-day-history, &quot;urn:activemq:core&quot;:connection-ttl-override, &quot;urn:activemq:core&quot;:connection-ttl-check-interval, &quot;urn:activemq:core&quot;:configuration-file-refresh-period, &quot;urn:activemq:core&quot;:temporary-queue-namespace, &quot;urn:activemq:core&quot;:async-connection-execution-enabled, &quot;urn:activemq:core&quot;:transaction-timeout, &quot;urn:activemq:core&quot;:transaction-timeout-scan-period, &quot;urn:activemq:core&quot;:message-expiry-thread-priority, &quot;urn:activemq:core&quot;:address-queue-scan-period, &quot;urn:activemq:core&quot;:id-cache-size, &quot;urn:activemq:core&quot;:persist-id-cache, &quot;urn:activemq:core&quot;:remoting-incoming-interceptors, &quot;urn:activemq:core&quot;:remoting-outgoing-interceptors, &quot;urn:activemq:core&quot;:persist-delivery-count-before-delivery, &quot;urn:activemq:core&quot;:populate-validated-user, &quot;urn:activemq:core&quot;:reject-empty-validated-user, &quot;urn:activemq:core&quot;:mqtt-session-scan-interval, &quot;urn:activemq:core&quot;:broadcast-groups, &quot;urn:activemq:core&quot;:discovery-groups, &quot;urn:activemq:core&quot;:diverts, &quot;urn:activemq:core&quot;:queues, &quot;urn:activemq:core&quot;:bridges, &quot;urn:activemq:core&quot;:federations, &quot;urn:activemq:core&quot;:ha-policy, &quot;urn:activemq:core&quot;:cluster-connections, &quot;urn:activemq:core&quot;:broker-connections, &quot;urn:activemq:core&quot;:connection-routers, &quot;urn:activemq:core&quot;:grouping-handler, &quot;urn:activemq:core&quot;:create-bindings-dir, &quot;urn:activemq:core&quot;:page-max-concurrent-io, &quot;urn:activemq:core&quot;:read-whole-page, &quot;urn:activemq:core&quot;:journal-retention-directory, &quot;urn:activemq:core&quot;:node-manager-lock-directory, &quot;urn:activemq:core&quot;:create-journal-dir, &quot;urn:activemq:core&quot;:journal-buffer-timeout, &quot;urn:activemq:core&quot;:journal-buffer-size, &quot;urn:activemq:core&quot;:journal-sync-transactional, &quot;urn:activemq:core&quot;:journal-sync-non-transactional, &quot;urn:activemq:core&quot;:log-journal-write-rate, &quot;urn:activemq:core&quot;:journal-compact-percentage, &quot;urn:activemq:core&quot;:journal-compact-min-files, &quot;urn:activemq:core&quot;:journal-file-open-timeout, &quot;urn:activemq:core&quot;:server-dump-interval, &quot;urn:activemq:core&quot;:global-max-messages, &quot;urn:activemq:core&quot;:global-max-size, &quot;urn:activemq:core&quot;:memory-warning-threshold, &quot;urn:activemq:core&quot;:memory-measure-interval, &quot;urn:activemq:core&quot;:store, &quot;urn:activemq:core&quot;:page-sync-timeout, &quot;urn:activemq:core&quot;:suppress-session-notifications, &quot;urn:activemq:core&quot;:broker-plugins, &quot;urn:activemq:core&quot;:metrics-plugin, &quot;urn:activemq:core&quot;:metrics, &quot;urn:activemq:core&quot;:resource-limit-settings, &quot;urn:activemq:core&quot;:connector-services, &quot;urn:activemq:core&quot;:network-check-list, &quot;urn:activemq:core&quot;:network-check-URL-list, &quot;urn:activemq:core&quot;:network-check-period, &quot;urn:activemq:core&quot;:network-check-timeout, &quot;urn:activemq:core&quot;:network-check-NIC, &quot;urn:activemq:core&quot;:network-check-ping-command, &quot;urn:activemq:core&quot;:network-check-ping6-command, &quot;urn:activemq:core&quot;:wildcard-addresses}&#39; is expected.

Any thoughts on what the issue with the configuration would be? I am running ActiveMQ Artemis 2.29.0.

答案1

得分: 2

任何 <bridge> 元素必须放置在 <bridges> 元素中,例如:

<bridges>
    <bridge name="my-bridge">
        <queue-name>sausage-factory</queue-name>
        <forwarding-address>mincing-machine</forwarding-address>
        <filter string="name='aardvark'"/>
        <transformer-class-name>org.apache.activemq.artemis.jms.example.HatColourChangeTransformer</transformer-class-name>
        <reconnect-attempts>-1</reconnect-attempts>
        <static-connectors>
            <connector-ref>remote-connector</connector-ref>
        </static-connectors>
    </bridge>
</bridges>

此示例摘自 ActiveMQ Artemis 附带的 "core-bridge" 示例,位于 examples/features/standard/core-bridge 目录。此示例演示了如何配置一个桥接器来在两个代理之间传递消息。

英文:

Any &lt;bridge&gt; element must be placed in the &lt;bridges&gt; element, e.g.:

      &lt;bridges&gt;
         &lt;bridge name=&quot;my-bridge&quot;&gt;
            &lt;queue-name&gt;sausage-factory&lt;/queue-name&gt;
            &lt;forwarding-address&gt;mincing-machine&lt;/forwarding-address&gt;
            &lt;filter string=&quot;name=&#39;aardvark&#39;&quot;/&gt;
            &lt;transformer-class-name&gt;org.apache.activemq.artemis.jms.example.HatColourChangeTransformer&lt;/transformer-class-name&gt;
            &lt;reconnect-attempts&gt;-1&lt;/reconnect-attempts&gt;
            &lt;static-connectors&gt;
               &lt;connector-ref&gt;remote-connector&lt;/connector-ref&gt;
            &lt;/static-connectors&gt;
         &lt;/bridge&gt;
      &lt;/bridges&gt;

This example was taken from the "core-bridge" example that ships with ActiveMQ Artemis is the examples/features/standard/core-bridge directory. This examples demonstrates how to configure a bridge to move messages between 2 brokers.

huangapple
  • 本文由 发表于 2023年6月29日 04:25:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76576507.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定