I am trying to save some data in MongoDB using apache Camel. Following is my code from("direct:saveData") .process(dataSaveRequestProcessor) .streamCaching() .to("mongodb:emailDB?database=myDB&collection=myData&operation=save&writeConcern=safe&writeResultAsHeader=true") .process(dataSaveResponseProcessor); Now issue is in MongoDB record is saved, but it is not returned back to my Response Processor. I need _id that is generated in MongoDB to pass to another Route. Following is System.out in Response Processor ===============> OUT BODY : null ===============> OUT BODY HEADER: {} ===============> IN BODY : { "serverUsed" : "/127.0.0.1:27017" , "n" : 0 , "connectionId" : 22 , "err" : null , "ok" : 1.0} ===============> IN BODY HEADER : {CamelMongoWriteResult={ "serverUsed" : "/127.0.0.1:27017" , "n" : 0 , "connectionId" : 22 , "err" : null ,"ok" : 1.0}, CamelMongoDbLastError={ "serverUsed" : "/127.0.0.1:27017" , "n" : 0 , "connectionId" : 22 , "err" : null , "ok" : 1.0}} Can anybody pointed out where I am making mistake. Why there is not _id in exchange.getIN().getBody() Thank you in Advance
-- View this message in context: http://camel.465427.n5.nabble.com/MongoDB-exchange-Out-Body-is-null-using-Apache-Camel-tp5742888.html Sent from the Camel Development mailing list archive at Nabble.com.