1 Reply Latest reply on Mar 2, 2010 4:58 PM by Tim O'Malley

    Problem with Camel/Mina in fuse-esb-

    Tim O'Malley Newbie

      After upgrading from ServiceMix version 3.2.2 to fuse-esb., an existing application no longer works.   It is a relatively simple application that uses a camel/mina codec to listen on a port to receive incoming requests.


      The behavior we are seeing now is that only one incoming message is being processed. It looks like the following class is only called once per session, even though there is more data arriving via the channel.


      Here is the portial of the codec that seems to be having the problem.




      package fuse_distribute_codec;


      import org.apache.mina.common.IoSession;

      import org.apache.mina.common.ByteBuffer;

      import org.apache.mina.filter.codec.CumulativeProtocolDecoder;

      import org.apache.mina.filter.codec.ProtocolDecoderOutput;




      import org.apache.mina.common.IoSession;

      import org.apache.mina.core.buffer.ByteBuffer;



      public class DistributeRequestDecoder extends CumulativeProtocolDecoder {



         protected boolean doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception {

              if (in.prefixedDataAvailable(4)) {

                  int length = in.getInt();

                  byte[] bytes = new byte[length];



                  String xmlMessage = new String(bytes, "ISO-8859-1");


                  return true;

              } else {

                  return false;






      The camel SU is as follows.




      package fuse_publish;


      import org.apache.camel.builder.RouteBuilder;




      • A Camel Router



      • @version $Revision: 1.1 $


      public class MyRouteBuilder extends RouteBuilder {


          public void configure() {