Re: file info lost in Exchange when passing through SEDA

2012-04-30 Thread Mark Webb
That was it.  I fell into the trap of using getOut().  Thank you.


On Mon, Apr 30, 2012 at 12:17 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Sounds like you do something wrong in your custom processor that
 removes the message body.
 See this FAQ
 http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

 On Mon, Apr 30, 2012 at 3:19 AM, Mark Webb elihusma...@gmail.com wrote:
 I have a couple routes set up, shown below:

        camel:route
                camel:from uri=file:data/dropdir?noop=true /
                camel:to uri=seda:analyzer /
        /camel:route

        camel:route
                camel:from uri=seda:analyzer /
                camel:process ref=FileDataProcessor /
                camel:choice
                        camel:when
                                camel:simple${in.header.status} == 
 'fail'/camel:simple
                                camel:to uri=file:data/failure /
                        /camel:when
                /camel:choice
        /camel:route

 I would like my FileDataProcessor bean to process the data that comes
 in to it, but the exchange is null.  I turned tracing on in the
 CamelContext and receive the following:

 [-1) thread #1 - file://data/dropdir] Tracer                      INFO
  myhost-62196-1335748044869-0-2  (route1)
 from(file://data/dropdir?noop=true) -- seda://analyzer 
 Pattern:InOnly, Headers:{CamelFileName=testdata.dat,
 breadcrumbId=myhost-62196-1335748044869-0-1,
 CamelFileParent=data/dropdir, CamelFileLastModified=Sun Apr 29
 21:07:33 EDT 2012, CamelFileAbsolute=false,
 CamelFilePath=data/dropdir/testdata.dat, CamelFileLength=151,
 CamelFileNameOnly=testdata.dat,
 CamelFileAbsolutePath=/Users/mark/workspace/CamelFileAnalyzer/data/dropdir/testdata.dat,
 CamelFileRelativePath=testdata.dat},
 BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is
 file based: GenericFile[testdata.dat]]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2) from(seda://analyzer) --
  Pattern:InOnly, Headers:{CamelFileRelativePath=testdata.dat,
 CamelFilePath=data/dropdir/testdata.dat, CamelFileLength=151,
 CamelFileNameOnly=testdata.dat, CamelFileParent=data/dropdir,
 CamelFileAbsolute=false, CamelFileLastModified=Sun Apr 29 21:07:33 EDT
 2012, 
 CamelFileAbsolutePath=/Users/mark/workspace/CamelFileAnalyzer/data/dropdir/testdata.dat,
 CamelFileName=testdata.dat,
 breadcrumbId=myhost-62196-1335748044869-0-1},
 BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is
 file based: GenericFile[testdata.dat]]
 [-1) thread #2 - seda://analyzer] FileDataProcessor   INFO  Exchange[null]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2)  -- choice 
 Pattern:InOnly, Headers:{status=pass}, BodyType:null, Body:[Body is
 null]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2) choice -- choice 
 Pattern:InOnly, Headers:{status=pass}, BodyType:null, Body:[Body is
 null]


 Can File-based Exchanges not pass through SEDA destinations or
 something like that?

 Thanks,
 Mark



 --
 Claus Ibsen
 -
 CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/


Re: file info lost in Exchange when passing through SEDA

2012-04-29 Thread Claus Ibsen
Hi

Sounds like you do something wrong in your custom processor that
removes the message body.
See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

On Mon, Apr 30, 2012 at 3:19 AM, Mark Webb elihusma...@gmail.com wrote:
 I have a couple routes set up, shown below:

        camel:route
                camel:from uri=file:data/dropdir?noop=true /
                camel:to uri=seda:analyzer /
        /camel:route

        camel:route
                camel:from uri=seda:analyzer /
                camel:process ref=FileDataProcessor /
                camel:choice
                        camel:when
                                camel:simple${in.header.status} == 
 'fail'/camel:simple
                                camel:to uri=file:data/failure /
                        /camel:when
                /camel:choice
        /camel:route

 I would like my FileDataProcessor bean to process the data that comes
 in to it, but the exchange is null.  I turned tracing on in the
 CamelContext and receive the following:

 [-1) thread #1 - file://data/dropdir] Tracer                      INFO
  myhost-62196-1335748044869-0-2  (route1)
 from(file://data/dropdir?noop=true) -- seda://analyzer 
 Pattern:InOnly, Headers:{CamelFileName=testdata.dat,
 breadcrumbId=myhost-62196-1335748044869-0-1,
 CamelFileParent=data/dropdir, CamelFileLastModified=Sun Apr 29
 21:07:33 EDT 2012, CamelFileAbsolute=false,
 CamelFilePath=data/dropdir/testdata.dat, CamelFileLength=151,
 CamelFileNameOnly=testdata.dat,
 CamelFileAbsolutePath=/Users/mark/workspace/CamelFileAnalyzer/data/dropdir/testdata.dat,
 CamelFileRelativePath=testdata.dat},
 BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is
 file based: GenericFile[testdata.dat]]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2) from(seda://analyzer) --
  Pattern:InOnly, Headers:{CamelFileRelativePath=testdata.dat,
 CamelFilePath=data/dropdir/testdata.dat, CamelFileLength=151,
 CamelFileNameOnly=testdata.dat, CamelFileParent=data/dropdir,
 CamelFileAbsolute=false, CamelFileLastModified=Sun Apr 29 21:07:33 EDT
 2012, 
 CamelFileAbsolutePath=/Users/mark/workspace/CamelFileAnalyzer/data/dropdir/testdata.dat,
 CamelFileName=testdata.dat,
 breadcrumbId=myhost-62196-1335748044869-0-1},
 BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is
 file based: GenericFile[testdata.dat]]
 [-1) thread #2 - seda://analyzer] FileDataProcessor   INFO  Exchange[null]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2)  -- choice 
 Pattern:InOnly, Headers:{status=pass}, BodyType:null, Body:[Body is
 null]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2) choice -- choice 
 Pattern:InOnly, Headers:{status=pass}, BodyType:null, Body:[Body is
 null]


 Can File-based Exchanges not pass through SEDA destinations or
 something like that?

 Thanks,
 Mark



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/