Netty Consumer is not able to pick up messagefrom any port sent through simple java socket clinet

sachin2713 at gmail.com sachin2713 at gmail.com
Thu May 26 01:20:56 EDT 2011


Thanks for your reply..
But 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://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-tp6398719p6405642.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list