FAQ
Hi All,
I am using wireTap to log the header / properties details.
I also want to make sure I do not copy the whole body of the message as that
would cause memory related issues when dealing with large number of huge
input files.

I am trying to understand the behind the scene work of Camel.

I tried the following (Which did give me the headers). Will the below
implementation still copy the whole exchange or just the Headers.
Also Please let me know how I could pass the Exchange Properties in a
similar way.

<route>
<from
uri="file:C:\\camelProject\\data\\inbox\\mars?move=C:\\camelProject\\data\\inbox\\bkp"/>
<wireTap uri="bean:testBean"/>
<to uri="stream:out"/>
</route>

public void testIntercept(@Headers Map<String, Object> headers){
log.info("Reached Intercept: "+headers);
}


Thanks & regards,
Ebe

--
View this message in context: http://camel.465427.n5.nabble.com/Passing-Header-Properties-to-Bean-tp5089208p5089208.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Bvahdat at Dec 20, 2011 at 3:43 pm

    Hi All,
    I am using wireTap to log the header / properties details.
    I also want to make sure I do not copy the whole body of the message as
    that would cause memory related issues when dealing with large number of
    huge input files.
    I am trying to understand the behind the scene work of Camel.
    I tried the following (Which did give me the headers). Will the below
    implementation still copy the whole exchange or just the Headers.
    There will be no copy of any kind for the whole exchange or the headers,
    your testIntercept() method gets just invoked with the value of the Map of
    the inbound message headers.
    Also Please let me know how I could pass the Exchange Properties in a
    similar way.
    Take a look at http://camel.apache.org/parameter-binding-annotations.html
    <route>
    <from
    uri="file:C:\\camelProject\\data\\inbox\\mars?move=C:\\camelProject\\data\\inbox\\bkp"/>
    <wireTap uri="bean:testBean"/>
    <to uri="stream:out"/>
    </route>
    public void testIntercept(@Headers Map<String, Object> headers){
    log.info("Reached Intercept: "+headers);
    }


    Thanks & regards,
    Ebe
    --
    View this message in context: http://camel.465427.n5.nabble.com/Passing-Header-Properties-to-Bean-tp5089208p5089230.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Ebinsingh at Dec 20, 2011 at 3:47 pm
    Thanks a lot for the quick reply. Is there a similar annotation to pass
    Exchange Properties.

    --
    View this message in context: http://camel.465427.n5.nabble.com/Passing-Header-Properties-to-Bean-tp5089208p5089239.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Christian Müller at Dec 20, 2011 at 8:17 pm
    Did you checked the link? If so, you should notice the @Properties
    annotation...

    Christian
    On Tue, Dec 20, 2011 at 4:47 PM, ebinsingh wrote:

    Thanks a lot for the quick reply. Is there a similar annotation to pass
    Exchange Properties.

    --
    View this message in context:
    http://camel.465427.n5.nabble.com/Passing-Header-Properties-to-Bean-tp5089208p5089239.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedDec 20, '11 at 3:34p
activeDec 20, '11 at 8:17p
posts4
users3
websitecamel.apache.org

People

Translate

site design / logo © 2022 Grokbase