有人可以帮助我在两个不同的消息代理之间配置 jms 桥接吗?就我而言,我必须让 activemq 消息代理(在 Wildfly 10 实例上运行)和 hornetq 消息代理(在 Wildfly 9 实例上运行)进行通信。
我试图按如下方式配置我的standalone-full.xml:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
<server name="default">
<security-setting name="#">
<role name="guest" delete-non-durable-queue="true" create-non-durable-queue="true" consume="true" send="true"/>
</security-setting>
<address-setting name="#" message-counter-history-day-limit="10" page-size-bytes="2097152" max-size-bytes="10485760" expiry-address="jms.queue.ExpiryQueue" dead-letter-address="jms.queue.DLQ"/>
<http-connector name="http-connector" endpoint="http-acceptor" socket-binding="http"/>
<http-connector name="http-connector-throughput" endpoint="http-acceptor-throughput" socket-binding="http">
<param name="batch-delay" value="50"/>
</http-connector>
<remote-connector name="http-connector" socket-binding="http"/>
<remote-connector name="netty-connector" socket-binding="netty"/>
<in-vm-connector name="in-vm" server-id="0"/>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0"/>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<jms-queue name="InvSyncLocalQueue" entries="java:/jms/queue/InvSyncLocalQueue"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
</server>
<jms-bridge name="transport-bridge" max-batch-time="60000" max-batch-size="5" max-retries="-1" failure-retry-interval="10000" quality-of-service="DUPLICATES_OK">
<source destination="jms/queue/InvSyncLocalQueue" connection-factory="ConnectionFactory"/>
<target password="password.123" user="user" destination="jms/queue/InvSyncRemoteQueue" connection-factory="jms/RemoteConnectionFactory">
<target-context>
<property name="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/>
<property name="java.naming.provider.url" value="http-remoting://127.0.0.1:8081"/>
<property name="java.naming.security.principal" value="user"/>
<property name="java.naming.security.credentials" value="password.123"/>
</target-context>
</target>
</jms-bridge>
我需要了解有关连接器和接受器的一些特殊信息吗? 我的配置中是否遗漏了某些内容?
谢谢大家。
下面是我在 Wildfly 25 服务器上配置的工作 JMS 桥。