Re: problems when call Kafka api

2016-12-04 Thread meng
Hi Willem, Your are right, the problem is related to my request body. I can post message to kafka server now. Thanks for your help! Meng -- View this message in context: http://camel.465427.n5.nabble.com/problems-when-call-Kafka-api-tp5790965p5790996.html Sent from the Camel - Users mailing

problems when call Kafka api

2016-12-03 Thread meng
/topics/test:publish";) But it returns 400 error. There is no error at the server side, for when I use the curl to call it, it works well. Here is my curl command: curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[

how to trigger my camel application

2016-11-15 Thread meng
sendBody() and to trigger the route. But in the actual usage scenario, I just listen the RabbitMQ, how the RabbitMQ could trigger the camel application and send message to camel? I don't want to wrap my application as a webservice. Thanks, Meng -- View this message in context: http://

Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-31 Thread meng
Hi Steve, I changed .completionPredicate(header("aggregated").isEqualTo(2)) to .completionSize(2) and now I can get the return result. But I'm still confused when to use completionPredicate and when to use completionSize ? Thanks, Meng -- View this message in context: http://

Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-30 Thread meng
exchangeOld.getIn().setBody(merged); //System.out.println(merged); return exchangeOld; } } } There is no error. ExchangeOld has setBody as merged string in this step, but in my route2, exchange getIn() is nothing. Seems exchangeOld doesn't return

Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-29 Thread meng
broadcasts message1 to 'direct:route1' and 'direct:route2'. 'direct:route2' does some processing and get a result message2 then sent it to 'direct:route2'. So 'direct:route2' now receive two massages. I can now print both message1 and message2.

Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-29 Thread meng
say 'direct:start' broadcasts message1 to 'direct:route1' and 'direct:route2'. 'direct:route2' does some processing and get a result message2 then sent it to 'direct:route2'. So 'direct:route2' now receive two massages. I can now print both

Re: apache camel returns statusCode:500

2016-10-28 Thread meng
Hi Avnish, Thanks for your replying. I finally found the problem is the json format I passed to the server is incorrect...Then it works now. Thanks, Meng -- View this message in context: http://camel.465427.n5.nabble.com/apache-camel-returns-statusCode-500-tp578p5789367.html Sent from

Re: Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-28 Thread meng
I change to .aggregate(simple("${body}"), new JoinReplyAggregationStrategy()), now no exceptions, but only returns the second exchange from route 2. No original payload comes in to aggregate -- View this message in context: http://camel.465427.n5.nabble.com/Problem-Concatenate-the-differen

Problem: Concatenate the different input(from different route) using aggreagationStrategy

2016-10-28 Thread meng
d.getIn().setBody(merged); //System.out.println(merged); return exchangeOld; } } } Can I use the aggregation Strategy to concatenate the input from other two routes directly like this? Or my understanding of aggregation is wrong? Thanks, Meng -- View this message in context: http://camel.465427.n5.nabble.com/Problem-Concatenate-the-different-input-from-different-route-using-aggreagationStrategy-tp5789368.html Sent from the Camel - Users mailing list archive at Nabble.com.

apache camel returns statusCode:500

2016-10-18 Thread meng
Hi All, I'm the new of camel. I now use apache camel to call several our webservices. Here is my code: public void configure() throws Exception{ from("direct:start") .marshal() .string(UTF_8) .to(TARGET http)