Hi You need to configure what codec you use so camel-netty knows what the data protocol is, eg what is the condition for a message to start/end etc. Is it text based or binary etc. And if its text based what are the terminating characters (new line or something else).
AFAIR the default is java object protocol which are very often not what you want to use. On Tue, Oct 8, 2019 at 4:02 PM Rohan Emmanuel <[email protected]> wrote: > > hi, > i am using camel as a standalone java application. This application is to > read input using TCP when client connects to it. > attaching the route below, i see that after reading initial 1024 bytes, the > route flow proceeded to other procesors with partail data. i want to be > able to read entire message and then proceed further in the route . can you > please advice. > Also adding extract of DEBUG logs for your reference.. > > > <from > uri="netty4:tcp://<IP_ADDRESS>:9993?allowDefaultCodec=false&exchangePattern=InOut"/> > <process ref="api.gway.getput.get.outboundRequest"/> > <log message="consumer route called . ${header.userId2} > .${header.CamelHttpMethod} . ${body}"/> > .... > .... > .. > > > DEBUG LOG: > NettyEventExecutorGroup] DEBUG > org.apache.camel.component.netty4.NettyConsumer - Channel: [id: 0x54bae73e, > L:/15.213.85.104:9993 - R:/15.213.82.141:3039] received body: > UnpooledUnsafeNoCleanerDirectByteBuf(ridx: 0, widx: 1024, cap: 1024) > reading body > the bytebuf is direct > 16:36:44.654 [Camel (camel-1) thread #3 - NettyEventExecutorGroup] INFO > consumer - consumer route called . .POST > .. > .. > 16:36:44.684 [Camel (camel-1) thread #3 - NettyEventExecutorGroup] DEBUG > org.apache.camel.component.netty4.NettyConsumer - Channel: [id: 0x54bae73e, > L:/15.213.85.104:9993 - R:/15.213.82.141:3039] received body: > UnpooledUnsafeNoCleanerDirectByteBuf(ridx: 0, widx: 16384, cap: 16384) > reading body > the bytebuf is direct > 16:36:44.827 [Camel (camel-1) thread #3 - NettyEventExecutorGroup] INFO > consumer - consumer route called . .POST . . > > On Tue, Oct 8, 2019 at 5:38 PM Omar Al-Safi <[email protected]> wrote: > > > I think there is some few information here, like how did you use it, how > > does your route looks like ..etc. Also did you take a look at netty example > > here > > > > https://github.com/apache/camel/tree/master/examples/camel-example-netty-http > > ? > > > > On Tue, 8 Oct 2019 at 13:49, Rohan Emmanuel <[email protected]> > > wrote: > > > > > Hi, > > > I have problem reading large payload using the netty TCP component. The > > > payload is getting read in chunks, can you please guide me as to how can > > I > > > read the entire payload > > > > > > -- > > > Regards, > > > Rohan Emmanuel > > > > > > > > -- > Regards, > Rohan Emmanuel -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
