-
1. Re: Switchyard sortBy for File Consumer
kcbabo Jul 16, 2013 10:02 PM (in response to stonesoft)Out of curiosity, have you tried using the existing sortBy element in the file binding config? I can prepare an example, but figured I would ask in case you already tried that and hit an issue.
-
2. Re: Switchyard sortBy for File Consumer
stonesoft Jul 17, 2013 6:45 AM (in response to kcbabo)No I haven't tried the sortBy in fhe file binding config. In fact I don't know what the file binding config is! I'll google it and I hope I find something. I'll let you know.
-
3. Re: Switchyard sortBy for File Consumer
kcbabo Jul 17, 2013 7:21 AM (in response to stonesoft)Each binding type in SwitchYard has a schema which defines the structure of its configuration model. For file bindings, you can see the options here:
https://docs.jboss.org/author/display/SWITCHYARD/File
The value range and behavior of these settings are identical to the Camel file component since we just create a Camel endpoint URI underneath the covers based on the binding config:
Using one of our quickstarts which uses file binding as an example:
https://github.com/jboss-switchyard/quickstarts/tree/master/camel-binding
I would expect something like this to work:
<file:binding.file xmlns:file="urn:switchyard-component-camel-file:config:1.0"> <file:directory>target/input</file:directory> <file:fileName>test.txt</file:fileName> <file:consume> <file:initialDelay>10</file:initialDelay> <file:delay>10</file:delay> <file:delete>true</file:delete> <file:sortBy>file:modified</file:sortBy> </file:consume> </file:binding.file>
-
4. Re: Switchyard sortBy for File Consumer
stonesoft Jul 17, 2013 8:08 AM (in response to kcbabo)Thats exactly what I wanted. I looked at my switchyard.xml and found the file binding but I hadn't actually added the sortBy before I read your email. Added it and everything seems to work as expected. Thanks