camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi21588 <>
Subject Re: Processing large PDF files using apache camel 2.10
Date Fri, 16 Dec 2016 12:34:44 GMT
Hi Claus,
Thanks for the reply.
Do you mean to place the pdf in a file location and use the stream component to get data as stream?

Also can you please tell me how the data transfer happens using stream

Using claim check EIP also at some point stores the message in to file store
or database  from exchange body as below example.

public static final class CheckLuggageBean {        
    public void checkLuggage(Exchange exchange, @Body String body,
@XPath("/order/@custId") String custId) {   
        // store the message body into the data store, using the custId as
the claim check
        *dataStore.put(custId, body);*
        // add the claim check as a header
        exchange.getIn().setHeader("claimCheck", custId);
        // remove the body from the message

and retrieve it at later point of time from the store and put it back in
exchange body as below.

public static final class DataEnricherBean {
    public void addDataBackIn(Exchange exchange, @Header("claimCheck")
String claimCheck) { 
        // query the data store using the claim check as the key and add the
        // back into the message body
        // remove the message data from the data store
        // remove the claim check header

I agree that instead of passing whole message in body in all the components
it is an better approach ,but even wont there be an memory issue?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message