How do you know you have received the complete message? This will determine the answer.<div>If you don't have a length header and have to rely on receiving a complete XML message take a look</div><div>at the ReplayingDecoder. However, this is far, far less efficient that adding a length header to your protocol.</div>
<div><br></div><div>Also, I looked at your CAMEL consumer code. Where are you defining your camel routes and adding them</div><div>to your context (I successfully use a netty server with CAMEL without problems) i.e.:</div>
<div><br></div><div>context.addRoutes(new RouteBuilder() {</div><div> public void configure() {</div><div> /* your routes definitions */</div><div> }</div><div>}</div><div><div><br></div><div>regards,</div><div>
Gareth</div><div><br><br><div class="gmail_quote">On Wed, May 25, 2011 at 7:43 AM, <a href="mailto:sachin2713@gmail.com">sachin2713@gmail.com</a> <span dir="ltr"><<a href="mailto:sachin2713@gmail.com">sachin2713@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
I debugged the netty source code and came to know while sending message from<br>
java client it causes problems in some decoding.<br>
It goes to decode method of LengthFieldBasedFrameDecoder class where the<br>
Frame length it fetched from Channel buffer exceeds the maxFrameLength,<br>
hence returning null.<br>
<br>
if (frameLength > maxFrameLength) {<br>
// Enter the discard mode and discard everything received so<br>
far.<br>
discardingTooLongFrame = true;<br>
tooLongFrameLength = frameLength;<br>
bytesToDiscard = frameLength - buffer.readableBytes();<br>
buffer.skipBytes(buffer.readableBytes());<br>
return null;<br>
}<br>
<br>
As i am sending simple xml message in byte form, which decoder i should use.<br>
Please guide me.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-Consumer-is-not-able-to-pick-up-messagefrom-any-port-sent-through-simple-java-socket-clinet-tp6398719p6402365.html" target="_blank">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-Consumer-is-not-able-to-pick-up-messagefrom-any-port-sent-through-simple-java-socket-clinet-tp6398719p6402365.html</a><br>
Sent from the Netty User Group mailing list archive at Nabble.com.<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
</font></blockquote></div><br></div></div>