camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhouij <zhouij...@gmail.com>
Subject Is it possible to have dynamic "from" uri with data in exchange? (Flatpack related)
Date Tue, 02 Sep 2014 22:43:02 GMT
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.

Mime
View raw message