Hi You can try using the data format component and refer to flatpack, and do that using "dynamic to"
http://camel.apache.org/dataformat-component.html http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html And your route can then use a regular file component to pickup the files. On Wed, Sep 3, 2014 at 12:43 AM, zhouij <[email protected]> wrote: > Hi, > > I have searched everywhere and couldn't find a good solution to our problem. > > We are trying to use the Flatpack component to parse fixed width files, > using Spring DSL. The parsing definition pzmap.xml is located under > different directories for different customers("resources/customer/{customer > name}/...pzmap.xml"). The customer name is determined at run time after a > file is picked up, and this information is stored in the exchange. > > The issue is, Flatpack endpoint requires that the parsing definition file > (pzmap.xml) to be included in the uri in the format of > uri="flatpack:fixed:customer/{customer name}/pzmap.xml". So this uri has to > be created dynamically during run time. > > I did try using a recipient list as some other posts suggested to achieve > the behavior of a dynamic "to" uri. However I am having trouble catching the > exchange coming out of flatpack after the recipient list, because the "from" > uri at the beginning of the next route also has to be calculated > dynamiclally to be "flatpack:fixed:customer/{customer name}/pzmap.xml", in > order for camel to connect them together. > > Does anyone have any suggestions? > > Thanks > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Is-it-possible-to-have-dynamic-from-uri-with-data-in-exchange-Flatpack-related-tp5755980.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
