如何配置jms-bridge?

时间:2017-03-30 15:35:16

标签: jms wildfly wildfly-10

有人可以帮我配置两个不同消息代理之间的jms-bridge?在我的情况下,我必须让一个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>

让我知道关于连接器和接受器的特定内容吗? 我会错过配置中的某些内容吗?

感谢大家。

0 个答案:

没有答案