Hi all, I am hoping that someone can help me with my problem. I have a client application that sends XML messages to Camel. I am using Mina2 v2.11.1 component in Camel as a endpoint to consume incoming XML. I have no control over the client application and in most cases it requires a response to the request. However there are a few messages that do not require a response. I am finding that if I do not respond to every message then it will drop the connection, this is not desired as it needs to maintain the connection wether a response is sent or not. I tried to set the disconnectOnNoReply = false, but it does not seem to be working as it continues to drop the connection. My route in camel is setup as…
<camel:route> <camel:from uri="mina2:tcp://10.5.60.60:9000?codec=#myDecoder&disconnectOnNoReply=false"/> <camel:bean ref="OutputProcessor"/> </camel:route> Is it possible that I am doing something wrong in my encoder that is causing this to happen? My encoder looks like… @Override public void encode(IoSession is, Object o, ProtocolEncoderOutput peo) throws Exception { if (o != null) { IoBuffer ioBuffer = IoBuffer.allocate(512, false); ioBuffer.setAutoExpand(true); ioBuffer.setAutoShrink(true); byte[] responseByteArr = (byte[]) o; ioBuffer.put(responseByteArr); ioBuffer.flip(); //Flip it or there will be nothing to send peo.write(ioBuffer); peo.flush(); } } If anyone can shed some light on this I would really appreciate it! Thanks! - Tim