2 Replies Latest reply on Apr 2, 2014 11:53 AM by stonesoft

    jboss eap 6.1 and switchyard 1.0 file consumer

    stonesoft

      I have a  file consumer for monitoring a directory.  I use the file:doneFileName and that works and the process does not consume a file until a .DONE file is put in the directory.  What I can't get working is file:exclude.    I want to exclude all files that start with "XXX-YYY_".   I have tried every regex that I can think of but it always gobbles up the file no matter.  I see in the debug that it doesn't find a match for the regex so I hope someone has done this before and tell me what I should use.  I have been able to get a file:filter to work by writing a java filter but I just cant stand that I couldn't make the file:exclude work.  Any ideas?

        • 1. Re: jboss eap 6.1 and switchyard 1.0 file consumer
          kcbabo

          This worked for me:

           

          <service name="GreetingService" promote="GreetingService">
                      <file:binding.file xmlns:file="urn:switchyard-component-camel-file:config:1.0">
                          <file:directory>/tmp/inbox</file:directory>
                          <file:consume>
                              <file:initialDelay>10</file:initialDelay>
                              <file:delay>10</file:delay>
                              <file:delete>true</file:delete>
                              <file:exclude>XXX-YYY_.*</file:exclude>
                          </file:consume>
                      </file:binding.file>
                  </service>
          

           

          Can you paste the config which is giving you trouble?

          • 2. Re: jboss eap 6.1 and switchyard 1.0 file consumer
            stonesoft

            My stupid mistake.  I have 2 baselines that I test against and I was testing against 7.1/switchyard 0.8 which doesn't support file:doneFileName.  When I switched to eap6.1/switchyard 1.0 everything worked just fine.