英文:
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:
<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>
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 '{"urn:activemq:core":bridge}'. One of '{"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, "urn:activemq:core":scheduled-thread-pool-max-size, "urn:activemq:core":thread-pool-max-size, "urn:activemq:core":graceful-shutdown-enabled, "urn:activemq:core":graceful-shutdown-timeout, "urn:activemq:core":security-enabled, "urn:activemq:core":security-invalidation-interval, "urn:activemq:core":authentication-cache-size, "urn:activemq:core":authorization-cache-size, "urn:activemq:core":journal-lock-acquisition-timeout, "urn:activemq:core":wild-card-routing-enabled, "urn:activemq:core":management-address, "urn:activemq:core":management-notification-address, "urn:activemq:core":cluster-user, "urn:activemq:core":cluster-password, "urn:activemq:core":password-codec, "urn:activemq:core":mask-password, "urn:activemq:core":log-delegate-factory-class-name, "urn:activemq:core":jmx-management-enabled, "urn:activemq:core":jmx-domain, "urn:activemq:core":jmx-use-broker-name, "urn:activemq:core":message-counter-enabled, "urn:activemq:core":message-counter-sample-period, "urn:activemq:core":message-counter-max-day-history, "urn:activemq:core":connection-ttl-override, "urn:activemq:core":connection-ttl-check-interval, "urn:activemq:core":configuration-file-refresh-period, "urn:activemq:core":temporary-queue-namespace, "urn:activemq:core":async-connection-execution-enabled, "urn:activemq:core":transaction-timeout, "urn:activemq:core":transaction-timeout-scan-period, "urn:activemq:core":message-expiry-thread-priority, "urn:activemq:core":address-queue-scan-period, "urn:activemq:core":id-cache-size, "urn:activemq:core":persist-id-cache, "urn:activemq:core":remoting-incoming-interceptors, "urn:activemq:core":remoting-outgoing-interceptors, "urn:activemq:core":persist-delivery-count-before-delivery, "urn:activemq:core":populate-validated-user, "urn:activemq:core":reject-empty-validated-user, "urn:activemq:core":mqtt-session-scan-interval, "urn:activemq:core":broadcast-groups, "urn:activemq:core":discovery-groups, "urn:activemq:core":diverts, "urn:activemq:core":queues, "urn:activemq:core":bridges, "urn:activemq:core":federations, "urn:activemq:core":ha-policy, "urn:activemq:core":cluster-connections, "urn:activemq:core":broker-connections, "urn:activemq:core":connection-routers, "urn:activemq:core":grouping-handler, "urn:activemq:core":create-bindings-dir, "urn:activemq:core":page-max-concurrent-io, "urn:activemq:core":read-whole-page, "urn:activemq:core":journal-retention-directory, "urn:activemq:core":node-manager-lock-directory, "urn:activemq:core":create-journal-dir, "urn:activemq:core":journal-buffer-timeout, "urn:activemq:core":journal-buffer-size, "urn:activemq:core":journal-sync-transactional, "urn:activemq:core":journal-sync-non-transactional, "urn:activemq:core":log-journal-write-rate, "urn:activemq:core":journal-compact-percentage, "urn:activemq:core":journal-compact-min-files, "urn:activemq:core":journal-file-open-timeout, "urn:activemq:core":server-dump-interval, "urn:activemq:core":global-max-messages, "urn:activemq:core":global-max-size, "urn:activemq:core":memory-warning-threshold, "urn:activemq:core":memory-measure-interval, "urn:activemq:core":store, "urn:activemq:core":page-sync-timeout, "urn:activemq:core":suppress-session-notifications, "urn:activemq:core":broker-plugins, "urn:activemq:core":metrics-plugin, "urn:activemq:core":metrics, "urn:activemq:core":resource-limit-settings, "urn:activemq:core":connector-services, "urn:activemq:core":network-check-list, "urn:activemq:core":network-check-URL-list, "urn:activemq:core":network-check-period, "urn:activemq:core":network-check-timeout, "urn:activemq:core":network-check-NIC, "urn:activemq:core":network-check-ping-command, "urn:activemq:core":network-check-ping6-command, "urn:activemq:core":wildcard-addresses}' 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 <bridge>
element must be placed in the <bridges>
element, e.g.:
<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>
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论