1 2 Previous Next 25 Replies Latest reply on Dec 16, 2013 11:39 AM by Justin Bertram

    bridge not working, why?

    mike just Master

      I am creating a new thread to track the bridge problem. The original thread is this one:https://community.jboss.org/message/849173

       

      I have tested several settings for the divert and bridge configuration and confirmed the divert is working fine, but the bridge seems not able to foward request from server1 to server2.

       

      I found the divert settins could work well on server1. Below is the setting.

      <diverts>
           <divert name="test-divert">
                              <address>jms.queue.queue/com.demo.testQueue</address>
                              <forwarding-address>jms.queue.queue/com.demo.testQueue1</forwarding-address>
                              <exclusive>true</exclusive>
           </divert></diverts>
      

       

      Then I tried adding bridge settings to expect forwarding request testQueue1 to testQueue2 on server2. Below is the setting

      <bridges>
           <bridge name="test-bridge">
                              <queue-name>jms.queue.queue/com.demo.testQueue1</queue-name>
                              <forwarding-address>jms.queue.queue/com.demo.testQueue2</forwarding-address>
                              <retry-interval>1000</retry-interval>
                              <retry-interval-multiplier>1.0</retry-interval-multiplier>
                              <reconnect-attempts>-1</reconnect-attempts>
                              <use-duplicate-detection>true</use-duplicate-detection>
                              <confirmation-window-size>10000000</confirmation-window-size>
                              <static-connectors>
                                  <connector-ref>remote-connector</connector-ref>
                              </static-connectors>
            </bridge>
      </bridges>
      

       

      But it does not work. I found testQueue1 is still consumed on server1 by testQueue1. I can not find what the problem is. Can someone help me?

       

      I have added the "remote-connector" on server1:

      <connectors>
                          <netty-connector name="netty" socket-binding="messaging"/>
                          <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
                              <param key="batch-delay" value="50"/>
                          </netty-connector>
                          <in-vm-connector name="in-vm" server-id="0"/>
                          <connector name="remote-connector">
                              <factory-class>
                                  org.hornetq.core.remoting.impl.netty.NettyConnectorFactory
                              </factory-class>
                              <param key="host" value="localhost"/>
                              <param key="port" value="5446"/>
                          </connector>
      </connectors>
      

       

      and "remote-connector' acceptor on server2:

      <acceptors>
                          <netty-acceptor name="netty" socket-binding="messaging"/>
                          <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
                              <param key="batch-delay" value="50"/>
                              <param key="direct-deliver" value="false"/>
                          </netty-acceptor>
                          <in-vm-acceptor name="in-vm" server-id="0"/>
                          <acceptor name="remote-connector">
                              <factory-class>
                                  org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory
                              </factory-class>
                              <param key="host" value="localhost"/>
                              <param key="port" value="5446"/>
                          </acceptor>
      </acceptors>
      

      BTW, server1 and server2 are running on my same machine.

       

      testQueue2 on server2:

      <jms-queue name="queue/com.demo.testQueue2">
           <entry name="queue/com.demo.testQueue2"/>
      </jms-queue>
      
        1 2 Previous Next