On Thu, Nov 1, 2012 at 7:45 AM, demetrios
<demetrios.rap...@dstglobalsolutions.com> wrote:
> My original message file that is passed in is moved.  Which I expect.
> I require the need to read in the body of a subsequent file to feed into
> other routes as part of my process depending on the contents of my original
> message file.
> So for example my message file contains the location of a file to read in
> SAMPLE.CSV.
>
> Passing this message file in the first time it processes it and does what is
> required with Sample.CSV.  Message file is then moved to another directory.
> I send through another message file which references the same Sample.CSV
> file.   The consumerTemplate.receive call then hangs at this point.
> Why is this the case?  It will work fine the first time or process many
> other files that havent been called before but when it repeats the process
> on a file it hangs.  Is there a way to release the Sample.CSv file?
>

You would need to delete the file using delete=true, or move the
processed file using some unique name,
so there is not a clash later if you drop in a file with a previous file name.

When exchanging data over files, its a good idea to use unique file names.


> My overall scenario is as follows:
> A message file is read in as part of a route and based on its contents it
> calls a subsequent route.  In that subsequent route I need to read in
> another message file based on the contents found in the first.  I need camel
> to take that contents and handle all the marshalling etc as it would to in
> the first file.  The file consumer managed to do that for us.  Do you have
> another way of achieving this?
>

The Camel file component only reads / writes files etc. It doesn't do
any marshalling etc.
That is what you have the other components / data formats etc for.



>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/consumerTemplate-receive-function-on-same-file-hanging-tp5721925p5721933.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to