<p>I do not know camel at all, but it looks like the Netty side is missing the bootstrap, pipeline factory, etc.</p>
<p>Just my 2 paisa :)</p>
<div class="gmail_quote">On 24-May-2011 7:43 PM, &quot;<a href="mailto:sachin2713@gmail.com">sachin2713@gmail.com</a>&quot; &lt;<a href="mailto:sachin2713@gmail.com">sachin2713@gmail.com</a>&gt; wrote:<br type="attribution">
&gt; Hi, <br>&gt; I am very new to camel and netty, please forgive my stupid mistakes.<br>&gt; <br>&gt; I am using Camel 2.6 along with netty 3.2.3 for tcp communication.<br>&gt; I am starting an endpoint at server startup which should execute any other<br>
&gt; business processing after receiving message.<br>&gt; <br>&gt; 1) As i dont want to bound clients with netty producer, i have to test<br>&gt; sending message without netty producer , hence i am using simple java socket<br>
&gt; client to send message to any port.But my processor is not able to pick up<br>&gt; the message. SHouldnt it be independent of client?<br>&gt; <br>&gt; 2) Though when i try with netty producer , it works fine, but for only once<br>
&gt; in one connection. second time it&#39;s not able to pick up message from netty<br>&gt; producer also, i have to restart my server i.e camel again.<br>&gt; <br>&gt; Below is my code:<br>&gt; <br>&gt; <br>&gt; EndPoint in camel-context:<br>
&gt; &lt;endpoint id=&quot;ByteStreamTransport&quot;<br>&gt;                         uri=&quot;netty:tcp://localhost:6123connectTimeout=5000&amp;amp;sync=false&quot; /&gt;<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; Java Client:( not complete)<br>
&gt; <br>&gt; socket = new Socket();<br>&gt; socket.connect(new InetSocketAddress(&quot;localhost&quot;, 9990));<br>&gt; OutputStream os = socket.getOutputStream();<br>&gt; ObjectOutputStream oos = new ObjectOutputStream(os);<br>
&gt;                           // oos.writeObject(emp);<br>&gt;                         <br>&gt; socket.getOutputStream().write(bytes);<br>&gt; socket.getOutputStream().flush();<br>&gt; socket.shutdownOutput(<br>&gt; )<br>&gt; <br>&gt; <br>&gt; <br>
&gt; <br>&gt; Netty Consumer:(I can see in logs that netty consumer is bound to this port)<br>&gt; <br>&gt; try {<br>&gt; NettyConsumer consumer = (NettyConsumer)<br>&gt; tcpProfile.getEndPoint().createConsumer(new TCPProcessor(this ,tcpProfile));<br>
&gt; consumer.start();                                                <br>&gt; <br>&gt; <br>&gt; <br>&gt; Netty Producer:<br>&gt; try {<br>&gt;                 <br>&gt;                   context = new DefaultCamelContext(); <br>&gt;           <br>&gt;                 context.start(); <br>&gt; <br>
&gt;                 Endpoint endpoint =<br>&gt; context.getEndpoint(&quot;netty:tcp://localhost:6123?sync=false&quot;);<br>&gt;                 Exchange exchange = endpoint.createExchange(ExchangePattern.InOnly);<br>&gt;                 exchange.getIn().setBody(&quot;sachin1&quot;);<br>
&gt;                 producer = (NettyProducer)endpoint.createProducer();<br>&gt;                 producer.start();                        <br>&gt;                 producer.process(exchange);<br>&gt;                 <br>&gt;                                 <br>&gt;         }<br>&gt;         catch (Exception e) {<br>&gt;                 // TODO Auto-generated catch block<br>
&gt;                 e.printStackTrace();<br>&gt;         }                                        }<br>&gt; <br>&gt; <br>&gt; --<br>&gt; 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-tp6398719p6398719.html">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-tp6398719p6398719.html</a><br>
&gt; Sent from the Netty User Group mailing list archive at Nabble.com.<br>&gt; _______________________________________________<br>&gt; netty-users mailing list<br>&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div>