0 Replies Latest reply on Dec 2, 2015 7:26 AM by Ramana Orugunta

    Need help to configure jms bridge in jboss-eap-6.4 from jboss-eap-4.3

    Ramana Orugunta Newbie

      Below is the configuration in jboss-eap-4.3 server

       

      <?xml version="1.0" encoding="UTF-8"?>

      <server>

          <mbean code="org.jboss.jms.server.bridge.BridgeService" name="jboss.messaging:service=Bridge,name=MyBridge"  xmbean-dd="xmdesc/Bridge-xmbean.xml">

             

              <!-- Optional: The Quality Of Service mode to use, one of: QOS_AT_MOST_ONCE

                  = 0; QOS_DUPLICATES_OK = 1; QOS_ONCE_AND_ONLY_ONCE = 2; -->

              <attribute name="QualityOfServiceMode">0</attribute>

             

              <!-- The number of ms to wait between connection returns in the event connections

                  to source or target fail -->

              <attribute name="FailureRetryInterval">5000</attribute>

             

              <!-- The maximum number of connection retries to make in case of failure,

                  before giving up -1 means try forever -->

              <attribute name="MaxRetries">-1</attribute>

              <attribute name="MaxBatchSize">1</attribute>

             

              <!-- The maximum time to wait (in ms) before sending a batch to the target

                  even if MaxBatchSize is not exceeded. -1 means wait forever -->

              <attribute name="MaxBatchTime">8000</attribute>

             

              <!-- ##################### source destination ################ -->

              <!-- The JMS provider loader that is used to lookup the source destination -->

              <!-- By default JBoss AS ships with one JMSProviderLoader, deployed in the file jms-ds.xml -->

              <depends optional-attribute-name="SourceProviderLoader">

                  jboss.jms:service=JMSProviderLoader,name=JMSProvider

              </depends>

             

              <!-- The JNDI lookup for the source destination -->

              <attribute name="SourceDestinationLookup">queue/OrderQueue</attribute>z

             

              <!-- ##################### target destination ################ -->

              <!-- The JMS provider loader that is used to lookup the target destination -->

              <depends optional-attribute-name="TargetProviderLoader">

                  jboss.jms:service=JMSProviderLoader,name=OERemoteJMSProvider

              </depends>

             

              <!-- The JNDI lookup for the target destination -->

              <attribute name="TargetDestinationLookup">queue/OrderQueue</attribute>

          </mbean>

      </server>

       

      ================================================================================

       

      I have configured below equivalent jms bridge in jboss-eap-6.4

       

       

      <jms-bridge name="MyBridge">

                      <source>

                          <connection-factory name="ConnectionFactory"/>

                          <destination name="jms/queue/OrderQueue"/>

                      </source>

                      <target>

                          <connection-factory name="jms/RemoteConnectionFactory"/>

                          <destination name="jms/queue/OrderQueue"/>

                          <context>

                              <property key="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/>

                              <property key="java.naming.provider.url" value="remote://127.0.0.1:1215"/>

                          </context>

                      </target>

                      <quality-of-service>AT_MOST_ONCE</quality-of-service>

                      <failure-retry-interval>5000</failure-retry-interval>

                      <max-retries>-1</max-retries>

                      <max-batch-size>1</max-batch-size>

                      <max-batch-time>8000</max-batch-time>

                      <add-messageID-in-header>true</add-messageID-in-header>

                  </jms-bridge>

       

       

      Below are the queries I have.

       

      1.destination name should be "jms/queue/OrderQueue"  or queue/OrderQueue ?

      2.Both connection-factory names "ConnectionFactory" and  "jms/RemoteConnectionFactory" are correct or not?

      3.Under <jms-connection-factories>, what is the connection-factory to be created?

       

      Below is the default jms-connection-factories configuration in jboss-eap-6.4 server

       

      <jms-connection-factories>                  

                          <connection-factory name="InVmConnectionFactory">

                              <connectors>

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

                              </connectors>

                              <entries>

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

                              </entries>

                          </connection-factory>

                          <connection-factory name="RemoteConnectionFactory">

                              <connectors>

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

                              </connectors>

                              <entries>

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

                              </entries>

                              <ha>true</ha>

                              <block-on-acknowledge>true</block-on-acknowledge>

                              <retry-interval>1000</retry-interval>

                              <retry-interval-multiplier>1.0</retry-interval-multiplier>

                              <reconnect-attempts>-1</reconnect-attempts>

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

       

      Could you please help me whether above jms configuration is correct or not.