Netty Consumer is not able to pick up messagefrom any port sent through simple java socket clinet
Gareth Collins
gareth.o.collins at gmail.com
Wed May 25 10:05:23 EDT 2011
How do you know you have received the complete message? This will determine
the answer.
If you don't have a length header and have to rely on receiving a complete
XML message take a look
at the ReplayingDecoder. However, this is far, far less efficient that
adding a length header to your protocol.
Also, I looked at your CAMEL consumer code. Where are you defining your
camel routes and adding them
to your context (I successfully use a netty server with CAMEL without
problems) i.e.:
context.addRoutes(new RouteBuilder() {
public void configure() {
/* your routes definitions */
}
}
regards,
Gareth
On Wed, May 25, 2011 at 7:43 AM, sachin2713 at gmail.com
<sachin2713 at gmail.com>wrote:
> Hi,
> I debugged the netty source code and came to know while sending message
> from
> java client it causes problems in some decoding.
> It goes to decode method of LengthFieldBasedFrameDecoder class where the
> Frame length it fetched from Channel buffer exceeds the maxFrameLength,
> hence returning null.
>
> if (frameLength > maxFrameLength) {
> // Enter the discard mode and discard everything received so
> far.
> discardingTooLongFrame = true;
> tooLongFrameLength = frameLength;
> bytesToDiscard = frameLength - buffer.readableBytes();
> buffer.skipBytes(buffer.readableBytes());
> return null;
> }
>
> As i am sending simple xml message in byte form, which decoder i should
> use.
> Please guide me.
>
> --
> View this message in context:
> 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
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110525/d8444ddd/attachment-0001.html
More information about the netty-users
mailing list