1 Reply Latest reply on Oct 1, 2013 3:19 AM by Daniel Grandl

    JMS Bridge

    Daniel Grandl Newbie

      Hi

       

      I'm new here so if i make mistakes please be gentle.

       

      Actually i'm working on a messaging system with queues. I've got Server0 with a queue0 and a MDB connected to queue0. on the other side of the network i got server1 with queue1 a MDB connected to that queue1 and a BRIDGE that should connect queue1 and queue0 (read from queue1 and write to queue0). i googled a lot but most of the examples are outdated. i tried to configure this setup on the managemant interface but i couldn't get it working.

       

      Here my standalone.xml (subsystem messaging)

       

      <subsystem xmlns="urn:jboss:domain:messaging:1.4">

                  <hornetq-server>

                      <persistence-enabled>true</persistence-enabled>

                      <journal-file-size>102400</journal-file-size>

                      <journal-min-files>2</journal-min-files>

       

       

                      <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>

                          <netty-connector name="remote" socket-binding="remote"/>

                          <servlet-connector name="servlet" host="default-host" socket-binding="http"/>

                          <in-vm-connector name="in-vm" server-id="0"/>

                      </connectors>

       

       

                      <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>

                          <netty-acceptor name="remote" socket-binding="remote"/>

                          <in-vm-acceptor name="in-vm" server-id="0"/>

                      </acceptors>

       

       

                      <security-settings>

                          <security-setting match="#">

                              <permission type="send" roles="guest"/>

                              <permission type="consume" roles="guest"/>

                              <permission type="createDurableQueue" roles="guest"/>

                              <permission type="deleteDurableQueue" roles="guest"/>

                              <permission type="createNonDurableQueue" roles="guest"/>

                              <permission type="deleteNonDurableQueue" roles="guest"/>

                              <permission type="manage" roles="guest"/>

                          </security-setting>

                      </security-settings>

       

       

                      <address-settings>

                          <address-setting match="#">

                              <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                              <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                              <redelivery-delay>0</redelivery-delay>

                              <max-size-bytes>10485760</max-size-bytes>

                              <page-size-bytes>2097152</page-size-bytes>

                              <address-full-policy>BLOCK</address-full-policy>

                              <message-counter-history-day-limit>10</message-counter-history-day-limit>

                          </address-setting>

                      </address-settings>

       

       

                      <jms-connection-factories>

                          <connection-factory name="InVmConnectionFactory">

                              <connectors>

                                  <connector-ref connector-name="in-vm"/>

                              </connectors>

                              <entries>

                                  <entry name="java:jboss/DefaultJMSConnectionFactory"/>

                                  <entry name="java:/ConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <connection-factory name="ServletConnectionFactory">

                              <connectors>

                                  <connector-ref connector-name="servlet"/>

                              </connectors>

                              <entries>

                                  <entry name="java:jboss/exported/jms/ServletConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <connection-factory name="RemoteConnectionFactory">

                              <connectors>

                                  <connector-ref connector-name="netty"/>

                              </connectors>

                              <entries>

                                  <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <pooled-connection-factory name="hornetq-ra">

                              <transaction mode="xa"/>

                              <connectors>

                                  <connector-ref connector-name="in-vm"/>

                              </connectors>

                              <entries>

                                  <entry name="java:/JmsXA"/>

                              </entries>

                          </pooled-connection-factory>

                      </jms-connection-factories>

       

       

                      <jms-destinations>

                          <jms-queue name="events">

                              <entry name="queue/events"/>

                              <entry name="java:jboss/exported/jms/queue/events"/>

                          </jms-queue>

                          <jms-queue name="as400import">

                               <entry name="queue/as400import"/>

        <entry name="java:jboss/exported/jms/queue/as400import"/>

                              <durable>true</durable>

                          </jms-queue>

                      </jms-destinations>

                  </hornetq-server>

              </subsystem>

       

      the socketbinding also exists:

            <socket-binding name="remote" port="5446" fixed-port="false"/>

       

      Any ideas ?

        • 1. Re: JMS Bridge
          Daniel Grandl Newbie

          Forgot the 2nd sever with the bridge

           

          defines this queue

          <jms-queue name="test">

                                  <entry name="queue/test"/>

                                  <entry name="java:jboss/exported/jms/queue/test"/>

                              </jms-queue>

           

          and the bridge

          <bridges>

                              <bridge name="bridge">

                                  <queue-name>queue/test</queue-name>

                                  <forwarding-address>java:jboss/exported/jms/queue/as400import</forwarding-address>

                                  <ha>false</ha>

                                  <use-duplicate-detection>false</use-duplicate-detection>

                                  <static-connectors>

                                      <connector-ref>

                                          bridge-connector

                                      </connector-ref>

                                  </static-connectors>

                              </bridge>

                          </bridges>

           

          with connector(bridge-connector) to an outbounded socketbinding to the remotehost