0 Replies Latest reply on Jan 30, 2011 1:37 PM by Florian Kunz

    Problems consuming remote JMS topic

    Florian Kunz Newbie

      Hi there,

       

      This is a JBoss Messaging/HornetQ interop issue, but the exception occurs on JBoss 5 side, so i decided to post here.

       

      I've got the following setup running:

       

      Server1: JBoss 5 host topic and an MDB that consumes from that topic

      Server2: JBoss 6, MDB to remotely consume the topic from Server1

       

      Both run on the same machine, therefore Server2 is started with jboss.service.binding.set=ports-01.

       

      Before I get to the details my first question to all JBoss/JMS/MDB users is: What would you think is the best/easiest way to configure a setup like this? Is JCA (ResourceAdapter) the best possible way to connect different servers in a distributed JMS/Messaging environment? What alternatives are thinkable?

       

      This is what I got at the moment:

       

      I tried to set up the Server2 HornetQ resource adapter to connect to the Server1 JBoss Messaging server. I get the following exception on Server1 (JBoss 5):

       

      18:58:09,095 ERROR [ServerThread] WorkerThread#1[127.0.0.1:61579] exception occurred during first invocation

      java.io.IOException: Can not read data for version 0.  Supported versions: 1,2,22

          at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:863)

          at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:707)

          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)

          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)

          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)

       

      Config files (all on Server2):  

          ra.xml

       

            <config-property>

               <description>The transport type</description>

               <config-property-name>ConnectorClassName</config-property-name>

               <config-property-type>java.lang.String</config-property-type>

               <config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>

            </config-property>

            <config-property>

               <description>The transport configuration. These values must be in the form of key=val;key=val;</description>

               <config-property-name>ConnectionParameters</config-property-name>

               <config-property-type>java.lang.String</config-property-type>

               <config-property-value>host=127.0.0.1;port=4457</config-property-value>

            </config-property>

       

       

          hornetq-configuration.xml

       

          <connectors>

            <connector name="netty">

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

            </connector>

       

            <connector name="netty-throughput">

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

               <param key="host"  value="${jboss.bind.address:localhost}"/>

               <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>

               <param key="batch-delay" value="50"/>

            </connector>

         </connectors>