You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by selva <sg...@gmail.com> on 2014/12/11 14:15:31 UTC

Camel-MongoDB: finadAll returns documents in laks - How to improve performance?

I am using in my camel spring DSl route with mongo findAll operation.
My route contains below:

<to
uri="mongodb:testDb?database={{testDb}}&collection={{testCollection}}&operation=findAll"
/>
<choice>
<when>
<simple>${headers.CamelMongoDbResultTotalSize} > 0 </simple>
<split streaming="true" parallelProcessing="true">
....
...mongo insert..
..mongo update...
..
</split>

Here I am enabled multi threading option in Splitter EIP pattern. If Mongo
returns 1 Lakh records in this case it throws below exception

*org.apache.camel.component.mongodb.CamelMongoDbException:
java.lang.IllegalArgumentException: response too long: 1936028162*

Note: Splitter EIP without parallelProcessing its process all the 1 lakh
records and its taking 30 minuts.

- Inside splitter I am doing mongo insertion and updation.

I am using com.mongodb.MongoClient & com.mongodb.MongoClientURI for mongo DB
connections.

Pls advise , is there anyway to improve the performance.




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MongoDB-finadAll-returns-documents-in-laks-How-to-improve-performance-tp5760569.html
Sent from the Camel - Users mailing list archive at Nabble.com.