6 Replies Latest reply on Feb 9, 2012 10:50 AM by britztopher

    JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server

    britztopher Newbie

      So I have been trying to get this working for quite sometime.  I was wondering if anyone knew how to get a ActiveMQ server to forward its messages to a JBoss 7.1CR1b server with HornetQ.  This is what I have tried:

       

      1. Added a netty-connector on the HornetQ server so that it would be able to connect to the ActiveMQ server to receive messages

      2. Added a outbound-socket-binding on the JBoss server to be able to bind to the ActiveMQ.

      3. Tried using the <bridge> element within the messaging subsystem, but it couldnt find the queue on the ActiveMQ server

      4. changed the connection transport from TCP to NIO on the ActiveMQ server within activeMQ.xml file

       

      Here is my jboss standalone-full.xml file

       

      So I have been trying to get this working for quite sometime.  I was wondering if anyone knew how to get a ActiveMQ server to forward its messages to a JBoss 7.1CR1b server with HornetQ.  This is what I have tried:

       

      1. Added a netty-connector on the HornetQ server so that it would be able to connect to the ActiveMQ server to receive messages

      2. Added a outbound-socket-binding on the JBoss server to be able to bind to the ActiveMQ.

      3. Tried using the <bridge> element within the messaging subsystem, but it couldnt find the queue on the ActiveMQ server

      4. changed the connection transport from TCP to NIO on the ActiveMQ server within activeMQ.xml file

       

      Here is my jboss standalone-full.xml file

       

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

       

      <server name="cbritz-laptop" xmlns="urn:jboss:domain:1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance">

       

          <extensions>

              <extension module="org.jboss.as.clustering.infinispan"/>

              <extension module="org.jboss.as.cmp"/>

              <extension module="org.jboss.as.connector"/>

              <extension module="org.jboss.as.deployment-scanner"/>

              <extension module="org.jboss.as.ee"/>

              <extension module="org.jboss.as.ejb3"/>

              <extension module="org.jboss.as.jacorb"/>

              <extension module="org.jboss.as.jaxrs"/>

              <extension module="org.jboss.as.jdr"/>

              <extension module="org.jboss.as.jmx"/>

              <extension module="org.jboss.as.jpa"/>

              <extension module="org.jboss.as.jsr77"/>

              <extension module="org.jboss.as.logging"/>

              <extension module="org.jboss.as.mail"/>

              <extension module="org.jboss.as.messaging"/>

              <extension module="org.jboss.as.naming"/>

              <extension module="org.jboss.as.osgi"/>

              <extension module="org.jboss.as.pojo"/>

              <extension module="org.jboss.as.remoting"/>

              <extension module="org.jboss.as.sar"/>

              <extension module="org.jboss.as.security"/>

              <extension module="org.jboss.as.threads"/>

              <extension module="org.jboss.as.transactions"/>

              <extension module="org.jboss.as.web"/>

              <extension module="org.jboss.as.webservices"/>

              <extension module="org.jboss.as.weld"/>

          </extensions>

       

       

          <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <authentication>

                          <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                  </security-realm>

              </security-realms>

              <management-interfaces>

                  <native-interface security-realm="ManagementRealm">

                      <socket-binding native="management-native"/>

                  </native-interface>

                  <http-interface security-realm="ManagementRealm">

                      <socket-binding http="management-http"/>

                  </http-interface>

              </management-interfaces>

          </management>

       

       

          <profile>

              <subsystem xmlns="urn:jboss:domain:logging:1.1">

                  <console-handler name="CONSOLE">

                      <level name="INFO"/>

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                      </formatter>

                  </console-handler>

                  <periodic-rotating-file-handler name="FILE">

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                      </formatter>

                      <file relative-to="jboss.server.log.dir" path="server.log"/>

                      <suffix value=".yyyy-MM-dd"/>

                      <append value="true"/>

                  </periodic-rotating-file-handler>

                  <logger category="com.arjuna">

                      <level name="WARN"/>

                  </logger>

                  <logger category="org.apache.tomcat.util.modeler">

                      <level name="WARN"/>

                  </logger>

                  <logger category="sun.rmi">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb.config">

                      <level name="ERROR"/>

                  </logger>

                  <root-logger>

                      <level name="INFO"/>

                      <handlers>

                          <handler name="CONSOLE"/>

                          <handler name="FILE"/>

                      </handlers>

                  </root-logger>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>

              <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                  <datasources>

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2DS" enabled="true" use-java-context="true">

                          <connection-url>

                              jdbc:h2:mem:test;DB_CLOSE_DELAY=-1

                          </connection-url>

                          <driver>

                              h2

                          </driver>

                          <security>

                              <user-name>

                                  sa

                              </user-name>

                              <password>

                                  sa

                              </password>

                          </security>

                      </datasource>

                      <drivers>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>

                                  org.h2.jdbcx.JdbcDataSource

                              </xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                  <deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" deployment-timeout="60"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

              <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <mdb>

                      <resource-adapter-ref resource-adapter-name="hornetq-ra"/>

                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                  </mdb>

                  <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

                  <caches>

                      <cache name="simple" aliases="NoPassivationCache"/>

                      <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                  </caches>

                  <passivation-stores>

                      <file-passivation-store name="file"/>

                  </passivation-stores>

                  <async thread-pool-name="default"/>

                  <timer-service thread-pool-name="default">

                      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                  </timer-service>

                  <remote connector-ref="remoting-connector" thread-pool-name="default"/>

                  <thread-pools>

                      <thread-pool name="default" max-threads="10" keepalive-time="100"/>

                  </thread-pools>

                  <iiop use-qualified-name="true" enable-by-default="true"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="hibernate">

                  <cache-container name="hibernate" default-cache="local-query">

                      <local-cache name="entity">

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="local-query">

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="timestamps">

                          <eviction strategy="NONE"/>

                      </local-cache>

                  </cache-container>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jacorb:1.1"/>

              <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

              <subsystem xmlns="urn:jboss:domain:jca:1.1">

                  <archive-validation enabled="false"/>

                  <bean-validation enabled="false"/>

                  <default-workmanager>

                      <short-running-threads blocking="true">

                          <core-threads count="10" per-cpu="20"/>

                          <queue-length count="10" per-cpu="20"/>

                          <max-threads count="10" per-cpu="20"/>

                          <keepalive-time time="10" unit="seconds"/>

                      </short-running-threads>

                      <long-running-threads blocking="true">

                          <core-threads count="10" per-cpu="20"/>

                          <queue-length count="10" per-cpu="20"/>

                          <max-threads count="10" per-cpu="20"/>

                          <keepalive-time time="10" unit="seconds"/>

                      </long-running-threads>

                  </default-workmanager>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

              <subsystem xmlns="urn:jboss:domain:jmx:1.1">

                  <show-model value="true"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                  <jpa default-datasource=""/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>

              <subsystem xmlns="urn:jboss:domain:mail:1.0">

                  <mail-session jndi-name="java:jboss/mail/Default" debug="false">

                      <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                  </mail-session>

              </subsystem>

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

                  <hornetq-server>

                      <persistence-enabled>

                          false

                      </persistence-enabled>

                      <message-counter-enabled>

                          true

                      </message-counter-enabled>

                      <journal-file-size>

                          102400

                      </journal-file-size>

                      <journal-min-files>

                          2

                      </journal-min-files>

                      <connectors>

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

                          <netty-connector name="activemq-consumer" socket-binding="activemq-consumer"/>

                          <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="remote-hornetq" socket-binding="remote-messaging"/>

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

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

                              <message-counter-history-day-limit>

                                  10

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

                              <address-full-policy>

                                  BLOCK

                              </address-full-policy>

                          </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="RemoteConnectionFactory"/>

                              </entries>

                          </connection-factory>

                          <connection-factory name="activemq">

                              <connectors>

                                  <connector-ref connector-name="activemq-consumer"/>

                              </connectors>

                              <entries>

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

                              </entries>

                          </connection-factory>

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

                              <transaction mode="xa"/>

                              <connectors>

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

                              </connectors>

                              <entries>

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

                              </entries>

                          </pooled-connection-factory>

                      </jms-connection-factories>

                      <jms-destinations>

                          <jms-queue name="remoteQueue">

                              <entry name="queue/remoteQueue"/>

                          </jms-queue>

                          <jms-queue name="activemQueue">

                              <entry name="queue/activemQueue"/>

                          </jms-queue>

                          <jms-topic name="testTopic">

                              <entry name="topic/test"/>

                          </jms-topic>

                      </jms-destinations>

                  </hornetq-server>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:naming:1.1"/>

              <subsystem xmlns="urn:jboss:domain:osgi:1.1" activation="lazy">

                  <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">

                      <property name="manager.root" value="jboss-osgi"/>

                  </configuration>

                  <properties>

                      <property name="org.osgi.framework.startlevel.beginning">

                          1

                      </property>

                  </properties>

                  <capabilities>

                      <capability name="javax.api"/>

                      <capability name="javax.servlet.api"/>

                      <capability name="javax.transaction.api"/>

                      <capability name="org.apache.aries.util"/>

                      <capability name="org.jboss.osgi.webconsole"/>

                      <capability name="org.osgi.compendium"/>

                      <capability name="org.apache.felix.log" startlevel="1"/>

                      <capability name="org.jboss.osgi.logging" startlevel="1"/>

                      <capability name="org.apache.felix.configadmin" startlevel="1"/>

                      <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>

                      <capability name="org.apache.aries.jmx" startlevel="2"/>

                      <capability name="org.apache.felix.eventadmin" startlevel="2"/>

                      <capability name="org.apache.felix.metatype" startlevel="2"/>

                      <capability name="org.apache.felix.scr" startlevel="2"/>

                      <capability name="org.apache.felix.webconsole" startlevel="2"/>

                      <capability name="org.jboss.netty" startlevel="2"/>

                      <capability name="org.jboss.osgi.jmx" startlevel="2"/>

                      <capability name="org.jboss.osgi.http" startlevel="2"/>

                      <capability name="org.projectodd.stilts" startlevel="2"/>

                      <capability name="org.jboss.osgi.blueprint" startlevel="3"/>

                      <capability name="org.jboss.osgi.webapp" startlevel="3"/>

                      <capability name="org.jboss.osgi.xerces" startlevel="3"/>

                  </capabilities>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

              <subsystem xmlns="urn:jboss:domain:remoting:1.1">

                  <connector name="remoting-connector" socket-binding="remoting"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>

              <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

              <subsystem xmlns="urn:jboss:domain:security:1.1">

                  <security-domains>

                      <security-domain name="other" cache-type="default">

                          <authentication>

                              <login-module code="UsersRoles" flag="required"/>

                          </authentication>

                      </security-domain>

                      <security-domain name="jboss-web-policy" cache-type="default">

                          <authorization>

                              <policy-module code="Delegating" flag="required"/>

                          </authorization>

                      </security-domain>

                      <security-domain name="jboss-ejb-policy" cache-type="default">

                          <authorization>

                              <policy-module code="Delegating" flag="required"/>

                          </authorization>

                      </security-domain>

                  </security-domains>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:threads:1.0"/>

              <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                  <core-environment>

                      <process-id>

                          <uuid/>

                      </process-id>

                  </core-environment>

                  <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                  <coordinator-environment default-timeout="300"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host">

                  <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                  <virtual-server name="default-host" enable-welcome-root="true">

                      <alias name="localhost"/>

                      <alias name="example.com"/>

                  </virtual-server>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:webservices:1.0" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jaxwsconfig="urn:jboss:jbossws-jaxws-config:4.0">

                  <modify-wsdl-address>

                      true

                  </modify-wsdl-address>

                  <wsdl-host>

                      ${jboss.bind.address:127.0.0.1}

                  </wsdl-host>

                  <endpoint-config>

                      <jaxwsconfig:config-name>

                          Standard-Endpoint-Config

                      </jaxwsconfig:config-name>

                  </endpoint-config>

                  <endpoint-config>

                      <jaxwsconfig:config-name>

                          Recording-Endpoint-Config

                      </jaxwsconfig:config-name>

                      <jaxwsconfig:pre-handler-chains>

                          <javaee:handler-chain>

                              <javaee:protocol-bindings>

                                  ##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM

                              </javaee:protocol-bindings>

                              <javaee:handler>

                                  <javaee:handler-name>

                                      RecordingHandler

                                  </javaee:handler-name>

                                  <javaee:handler-class>

                                      org.jboss.ws.common.invocation.RecordingServerHandler

                                  </javaee:handler-class>

                              </javaee:handler>

                          </javaee:handler-chain>

                      </jaxwsconfig:pre-handler-chains>

                  </endpoint-config>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:weld:1.0"/>

          </profile>

       

       

          <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

              </interface>

              <interface name="public">

                  <inet-address value="${jboss.bind.address:127.0.0.1}"/>

              </interface>

          </interfaces>

       

       

          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="http" port="8080"/>

              <socket-binding name="https" port="8443"/>

              <socket-binding name="jacorb" port="3528"/>

              <socket-binding name="jacorb-ssl" port="3529"/>

              <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>

              <socket-binding name="jmx-connector-server" interface="management" port="1091"/>

              <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

              <socket-binding name="messaging" port="5445"/>

              <socket-binding name="messaging-throughput" port="5455"/>

              <socket-binding name="osgi-http" interface="management" port="8090"/>

              <socket-binding name="remoting" port="4447"/>

              <socket-binding name="txn-recovery-environment" port="4712"/>

              <socket-binding name="txn-status-manager" port="4713"/>

              <socket-binding name="remote-messaging" port="5655"/>

              <outbound-socket-binding name="activemq-consumer">

                  <remote-destination host="15.0.24.212" port="61616"/>

              </outbound-socket-binding>

              <outbound-socket-binding name="mail-smtp">

                  <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

          </socket-binding-group>

       

       

          <deployments>

              <deployment name="remote_hornetq_mdb-0.0.1-SNAPSHOT.jar" runtime-name="remote_hornetq_mdb-0.0.1-SNAPSHOT.jar">

                  <content sha1="6020391f9541212867656ba2c752ff4b6917d183"/>

              </deployment>

          </deployments>

       

      </server>

       

      __________________________________________________________________________

       

      As you can see I have the correct connection factories, netty connectors, and socket binding in place to have them talk to eachother, however, when I put a message up on the activeMQ server HornetQ does not want to pick it up and "act" as a consumer.

       

      This is all in theory and sounds like it should work.  Any help is muchly appreciated

        • 1. Re: JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server
          Justin Bertram Master

          I assume you want to move messages from ActiveMQ to JBoss AS because you have an MDB which needs to consume those messages.  If that assumption is correct then you need to copy the ActiveMQ JCA RA to the appropriate "deployments" directory and then configure the MDB to use it, e.g.:

          import javax.ejb.ActivationConfigProperty;

          import javax.ejb.MessageDriven;

          import javax.jms.Message;

          import javax.jms.MessageListener;


          import org.jboss.ejb3.annotation.ResourceAdapter;


          @MessageDriven(activationConfig = {

              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "example.A")})

          @ResourceAdapter("activemq-rar.rar")

          public class ActiveMQEjb3Mdb implements MessageListener {

              public void onMessage(Message m) {

              }

          }

           

          Setting up a Netty connector to go to ActiveMQ doesn't make sense because ActiveMQ doesn't use Netty.  Furthermore, the <bridge> element is exclusive to HornetQ.  It will not work with ActiveMQ.

          • 2. Re: JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server
            britztopher Newbie

            Your assumptions are somewhat correct, however, I would like to make it so my messages are being fed into a hornetQ Queue where they will be consumed by the MDB's off of the hornetQ.  So flow of control would be: Client produces messages to ActiveQ --> HornetQ consumes those messages either over tcp or nio to a HornetQ queue running on JBoss AS7 --> MDB's consumes those messages off of the HornetQ server and processes them however.  So having the activemq-ra.rar within the MDB as a ResourceAdapter would not be necessary because the MDBs will be consuming from an HornetQ bucket.

             

            Also, I know that ActiveMQ doesnt use netty, but I thought that if you set up your transport connectors within ActiveMQ to handle NIO connections it would work.  Is that not a correct assumption?

            • 3. Re: JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server
              Justin Bertram Master

              To do what you want you would need a generic JMS bridge (i.e. not a HornetQ "core" <bridge>) to move the messages from ActiveMQ to HornetQ running in AS7.  HornetQ has such a JMS bridge, but I don't believe it has been accounted for in the configuration schema so there is no easy way to create/configure one at this point.

               

              So I think your best bet would be to configure the MDB in AS7 to connect directly to ActiveMQ via the ActiveMQ JCA RA.

               

              Lastly, I don't see any way a Netty connector could work with ActiveMQ. 

              • 4. Re: JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server
                britztopher Newbie

                I agree with you about the bridge not being able to work because they are not two HornetQ servers.  However, isnt Netty just an implementation of the NIO Java Spec?  Shouldnt they both be able to communicate using NIO if they both support a way to use NIO?  I have opened a port on the ActiveMQ server using NIO within the activemq.xml file like so:

                 

                <!--

                            The transport connectors expose ActiveMQ over a given protocol to

                            clients and other brokers. For more information, see:

                 

                            http://activemq.apache.org/configuring-transports.html

                        -->

                        <transportConnectors>

                           <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" enableStatusMonitor="true"/>

                 

                          <transportConnector name="nio" uri="nio://0.0.0.0:62626" enableStatusMonitor="true"/>

                        </transportConnectors>

                 

                I dont know if this is correct, but theoretically it sounds like they should be able to talk to eachother.  Unless you think that hornetQ can use a TCP connection to transfer messages. I just dont see any option in the xml schema for connectors/acceptors other than netty-connector and in-vm. 

                 

                I guess what I plan to accomplish from this is a remote hornetQ server within JBoss AS7 managing all my 'Queue' servers.

                 

                Does this not sound like it should be a possiblitly to implement?

                • 5. Re: JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server
                  Justin Bertram Master

                  However, isnt Netty just an implementation of the NIO Java Spec?

                  Netty is an NIO framework which uses some Java NIO under-the-covers, but it isn't "just an implementation of the NIO Java Spec."  It is much more than that.  Furthermore, to my knowledge NIO is not a protocol like HTTP where one can hook together clients and servers regardless of the implementation details of each (which is what it appears you're trying to do).

                  Unless you think that hornetQ can use a TCP connection to transfer messages.

                  Netty can certainly talk over TCP, but you appear to making a similar mistake here as above.  TCP is just a network transport.  Just because a client and server both use TCP does not mean they can interact in any meaningful way.  HornetQ clients and servers expect a certain protocol that is not compatible with ActiveMQ.  You can't simply plug to two together like this.  You either need to use the ActiveMQ JCA RA or a generic JMS bridge (e.g. org.hornetq.jms.bridge.impl.JMSBridgeImpl).  Either of these would act as a "middle man" to translate between HornetQ and ActiveMQ.

                  I guess what I plan to accomplish from this is a remote hornetQ server within JBoss AS7 managing all my 'Queue' servers.

                  I'm not exactly sure what you mean here.  However, even if you were able to set up a JMS bridge to move messages from ActiveMQ to HornetQ in AS7 you would still need to manage the ActiveMQ server along with the JMS bridge on the AS7 side.

                   

                  In any case, the JMS bridge is a going to be an uphill battle at this point since it isn't supported in the configuration schema.  As I indicated previously your best bet is going to be deploying the ActiveMQ JCA RA into AS7 and using and MDB to consume messages directly from ActiveMQ.

                  • 6. Re: JMS Messaging between HornetQ on JBossAS7.1CR1b and ActiveMQ server
                    britztopher Newbie

                    Thanks alot Justin I appreciate the help.  I guess I will either use the RA way or just wait for the JMS bridge support in AS7.