FYI I am already using LengthFieldPrepender for encoding which will add the
length header to my messages, correct me i am wrong.
And LengthFieldBasedFrameDecoder for decoding purpose.

And i am not using any route fetaures of camel as of now,  i am using only
endpoints defined in camel-context.xml using spring DSL. Please hava a look
of my camel context provided below where i have mentioned encoder and
decoder in camel context itself.


<util:list id="encoders" list-class="java.util.LinkedList">
<bean class="org.jboss.netty.handler.codec.frame.LengthFieldPrepender">
        <constructor-arg value="4" />
</bean>
</util:list>
<util:list id="decoders" list-class="java.util.LinkedList">
<bean
class="org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder">
                        <constructor-arg value="1048576" />
                        <constructor-arg value="0" />
                        <constructor-arg value="4" />
                        <constructor-arg value="0" />
                        <constructor-arg value="4" />
</bean>
</util:list>


<bean id="length-encoder"
                
class="org.jboss.netty.handler.codec.frame.LengthFieldPrepender">
                <constructor-arg value="4" />
</bean>

<bean id="length-decoder"
                
class="org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder">
                <constructor-arg value="1048576" />
                <constructor-arg value="0" />
                <constructor-arg value="4" />
                <constructor-arg value="0" />
                <constructor-arg value="4" />
</bean>

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>

                <camel:threadPoolProfile id="threadProfile"
                        defaultProfile="true" maxPoolSize="50" 
maxQueueSize="100" />
                <camel:threadPool poolSize="10" threadName="tcpThread"
                        id="tcpThreadPool" />
<endpoint id="XMLTcpTest"
uri="netty:tcp://localhost:9990?connectTimeout=5000&amp;sync=false&amp;encoders=#length-encoder&amp;decoders=#length-decoder"
/>
</camel-context>

--
View this message in context: 
http://camel.465427.n5.nabble.com/Netty-Consumer-is-not-able-to-process-message-sent-from-plain-java-socket-client-tp4422177p4427584.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to