<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Problems consuming remote JMS topic
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/florian.kunz">Florian Kunz</a> in <i>JBoss Messaging</i> - <a href="http://community.jboss.org/message/584127#584127">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi there,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is a JBoss Messaging/HornetQ interop issue, but the exception occurs on JBoss 5 side, so i decided to post here. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> I've got the following setup running:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Server1: JBoss 5 host topic and an MDB that consumes from that topic</p><p>Server2: JBoss 6, MDB to remotely consume the topic from Server1</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Both run on the same machine, therefore Server2 is started with jboss.service.binding.set=ports-01.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is what I got at the moment:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>18:58:09,095 ERROR [ServerThread] WorkerThread#1[127.0.0.1:61579] exception occurred during first invocation</p><p>java.io.IOException: Can not read data for version 0.&#160; Supported versions: 1,2,22</p><p>&#160;&#160;&#160; at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:863)</p><p>&#160;&#160;&#160; at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:707)</p><p>&#160;&#160;&#160; at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)</p><p>&#160;&#160;&#160; at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)</p><p>&#160;&#160;&#160; at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Config files (all on Server2):&#160;&#160; </p><p>&#160;&#160;&#160; ra.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;config-property&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;description&gt;The transport type&lt;/description&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;config-property-name&gt;ConnectorClassName&lt;/config-property-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;config-property-type&gt;java.lang.String&lt;/config-property-type&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;config-property-value&gt;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory&lt;/config-property-value&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/config-property&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;config-property&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;description&gt;The transport configuration. These values must be in the form of key=val;key=val;&lt;/description&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;config-property-name&gt;ConnectionParameters&lt;/config-property-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;config-property-type&gt;java.lang.String&lt;/config-property-type&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;config-property-value&gt;host=127.0.0.1;port=4457&lt;/config-property-value&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/config-property&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; hornetq-configuration.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; &lt;connectors&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;connector name="netty"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;factory-class&gt;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory&lt;/factory-class&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/connector&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;connector name="netty-throughput"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;factory-class&gt;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory&lt;/factory-class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param key="host"&#160; value="${jboss.bind.address:localhost}"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param key="port"&#160; value="${hornetq.remoting.netty.batch.port:5455}"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param key="batch-delay" value="50"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/connector&gt;</p><p>&#160;&#160; &lt;/connectors&gt;</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/584127#584127">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Messaging at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>