Hello, Since camel-mina2 all consumer(from) exchanges are InOut. This is different to camel-mina. Maybe it is related to that one. But actually you say just it does not work. But what exactly is not working?
Thomas On Tue, Dec 9, 2014 at 10:33 AM, Saurabh Singhal <earthonclo...@gmail.com> wrote: > I have been trying to send data through socket programming to Apache Camel > and I am trying to use *Apache Mina2*. The idea is to send the data over > TCP > to Camel. For TCP, I am using socket programing. This is what my code is > for > *Mina2*: > > public void configure() throws Exception { > from("mina2:tcp://localhost:6789?sync=false&") > .process(new LogProcessor()); > } > > *LogProcessor *only prints the body of the received message using : > *exchange.getIn().getBody(String.class)* > > This piece of code works fine with Apache Mina as below: > > *from("mina:tcp://localhost:6789?textline=true&sync=true") > .process(new LogProcessor());* > > The socket programming client code that I am using is as below: > > try > { > Socket client = new Socket(); > > > PrintWriter s_out = null;*/ > > client.connect(new InetSocketAddress("localhost", 6789)); > > OutputStream outToServer = client.getOutputStream(); > DataOutputStream out = new DataOutputStream(outToServer); > System.out.println("After Dataoutput stream"); > out.writeBytes("Content gets received in server\n"); > > client.close(); > } > The same piece of code works fine for Mina but does not work with Mina2. I > am unable to figure out what is causing the problem. Do I need to add some > parameters in the from clause of Camel. > > Kindly help. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-not-receiving-data-using-Socket-tp5760372.html > Sent from the Camel - Users mailing list archive at Nabble.com. >