I created a route to buffer/store marshaled objects (json) into files. This
route (and the other route to read the buffer) work fine.
storing in buffer:
               
from(DIRECT_IN).marshal().json().marshal().gzip().to(fileTarget());
reading from buffer:
               
from(fileTarget()).unmarshal().gzip().unmarshal().json().to("mock:a")

To reduce i/o i want to aggregate many exchanges in one file. I tried to
just aggregate after json and before it so i added this after json() or
from(...):
.aggregate(constant(true)).completionSize(20).completionTimeout(1000).groupExchanges()

In both cases i get conversion exceptions. How to do it correctly? I would
prefer a way without custom aggregator. And it would be nice if just many
exchanges/object are aggregated in one json (as list of objects).

Thanks in advance.




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-aggregate-many-marshalled-json-objects-to-one-file-tp5759204.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to