1 Reply Latest reply on Jul 17, 2013 3:09 PM by Justin Bertram

    jms-bridge

    akash bansal Newbie

      Hi,

       

      I am trying to setup jms-bridge between two Jboss AS 7.2 in domain mode. Although Bridge gets setup and started up but messages are net delivered from source topic to target queue. My Configuration is as follows:

       

      Machine 1:

              domain controller1

              domain controller2

       

      Machine 2:

             host controller1 bound with domain controller1 on Machine 1.

             host controller2 bound with domain controller2 on Machine 1.

       

      domain.xml file of domain controller1

       

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

                      <hornetq-server>

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

                          <security-enabled>false</security-enabled>

                          <cluster-user>corelogic</cluster-user>

                          <cluster-password>corelogic@123</cluster-password>

                          <journal-type>NIO</journal-type>

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

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

                              <connector name="netty-bridge">

                                  <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                                  <param key="host" value="10.134.154.22"/>

                                  <param key="port" value="5645"/>

                              </connector>

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

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

                          </acceptors>

       

                          <broadcast-groups>

                              <broadcast-group name="bg-group1">

                                  <socket-binding>messaging-group</socket-binding>

                                  <broadcast-period>5000</broadcast-period>

                                  <connector-ref>

                                      netty

                                  </connector-ref>

                              </broadcast-group>

                          </broadcast-groups>

       

                          <discovery-groups>

                              <discovery-group name="dg-group1">

                                  <socket-binding>messaging-group</socket-binding>

                                  <refresh-timeout>10000</refresh-timeout>

                              </discovery-group>

                          </discovery-groups>

       

                          <cluster-connections>

                              <cluster-connection name="my-cluster">

                                  <address>jms</address>

                                  <connector-ref>netty</connector-ref>

                                  <discovery-group-ref discovery-group-name="dg-group1"/>

                              </cluster-connection>

                          </cluster-connections>

       

                          <security-settings>

                              <security-setting match="#">

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

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

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

                                  <permission type="deleteNonDurableQueue" 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>

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

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

                                  <redistribution-delay>1000</redistribution-delay>

                              </address-setting>

                          </address-settings>

       

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

                              <connection-factory name="FloodConnectionQueueFactory-swan">

                                  <connectors>

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

                                  </connectors>

                                  <entries>

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

                                  </entries>

                                  <failover-on-initial-connection>false</failover-on-initial-connection>

                                  <use-global-pools>true</use-global-pools>

                              </connection-factory>

                              <connection-factory name="RemoteConnectionFactoryBridge">

                                  <connectors>

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

                                  </connectors>

                                  <entries>

                                      <entry name="RemoteConnectionFactoryBridge"/>

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

                                  </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="AsyncLoggingQueue-swan">

                                  <entry name="java:jboss/exported/fc/loggingQueue"/>

                                  <entry name="fc/loggingQueue"/>

                                  <durable>false</durable>

                              </jms-queue>

                              <jms-topic name="AsyncLoggingTopic-swan">

                                  <entry name="java:jboss/exported/fc/loggingTopic"/>

                                  <entry name="fc/loggingTopic"/>

                              </jms-topic>

                          </jms-destinations>

                      </hornetq-server>

                      <jms-bridge name="myBridge">

                          <source>

                              <connection-factory name="RemoteConnectionFactoryBridge"/>

                              <destination name="fc/loggingTopic"/>

                          </source>

                          <target>

                              <connection-factory name="ConnectionFactory"/>

                              <destination name="fc/loggingQueue"/>

                          </target>

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

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

                          <max-retries>7890</max-retries>

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

                          <max-batch-time>1000</max-batch-time>

                      </jms-bridge>

                  </subsystem>

       

       

       

       

       

      Below is configuration for  domain controller2

       

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

                      <hornetq-server>

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

                          <security-enabled>false</security-enabled>

                          <cluster-user>corelogic</cluster-user>

                          <cluster-password>corelogic@123</cluster-password>

                          <journal-type>NIO</journal-type>

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

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

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

                          </acceptors>

       

                          <broadcast-groups>

                              <broadcast-group name="bg-group1">

                                  <socket-binding>messaging-group</socket-binding>

                                  <broadcast-period>5000</broadcast-period>

                                  <connector-ref>

                                      netty

                                  </connector-ref>

                              </broadcast-group>

                          </broadcast-groups>

       

                          <discovery-groups>

                              <discovery-group name="dg-group1">

                                  <socket-binding>messaging-group</socket-binding>

                                  <refresh-timeout>10000</refresh-timeout>

                              </discovery-group>

                          </discovery-groups>

       

                          <cluster-connections>

                              <cluster-connection name="my-cluster">

                                  <address>jms</address>

                                  <connector-ref>netty</connector-ref>

                                  <discovery-group-ref discovery-group-name="dg-group1"/>

                              </cluster-connection>

                          </cluster-connections>

       

                          <security-settings>

                              <security-setting match="#">

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

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

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

                                  <permission type="deleteNonDurableQueue" 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>

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

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

                                  <redistribution-delay>1000</redistribution-delay>

                              </address-setting>

                          </address-settings>

       

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

                              <connection-factory name="FloodConnectionQueueFactory-fcws">

                                  <connectors>

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

                                  </connectors>

                                  <entries>

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

                                  </entries>

                                  <failover-on-initial-connection>false</failover-on-initial-connection>

                                  <use-global-pools>true</use-global-pools>

                              </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-topic name="AsyncLoggingTopic-fcws">

                                  <entry name="java:jboss/exported/fc/loggingTopic"/>

                              </jms-topic>

                          </jms-destinations>

                      </hornetq-server>

                  </subsystem>

       

       

       

      Pls. help me. I have been looking into this issue for last three days but did not find why it is not working.

        • 1. Re: jms-bridge
          Justin Bertram Master

          How are you confirming that the messages are not delivered as expected?

           

          I can't say for sure, but this may be related to an issue I discovered recently when using AT_MOST_ONCE for the <quality-of-service> on the bridge.  You can try using DUPLICATES_OK and see if that resolves the issue.