JBoss ESB - How to have multiple input folders for file system provider

876 views Asked by At

I m using Jboss ESB for my application. I want to implement ESB that listen the input folders which are dynamically created and when the file comes do the business logic. I have paced a problem at creating the dynamic input folders for esb . I'm using following codes for configure the file system provider.

<fs-message-filter
                directory="C:\Project_Root\Projects\FinESB\build\dirs\input"
                input-suffix=".XML"
                work-suffix=".esbWorking"
                post-delete="true"
                post-directory="C:\Project_Root\Projects\FinESB\build\dirs\output"
                post-suffix=".ACK" 
                error-delete="false"
                error-directory="C:\Project_Root\Projects\FinESB\build\dirs\error"
                error-suffix=".IN_ERROR"
            />

if you have sn idea please reply me.

1

There are 1 answers

3
beeler78 On

The directory attribute in the configuration file doesn't actually cause a directory to be created in your file system, so it's not "dynamic". JBoss ESB assumes that this directory has already been created. If you attempt to deploy an fs-provider whose directory doesn't exist, you will get a deployment error.

To configure your fs-provider with multiple directories, simply add another <fs-bus> to your provider's configuration.

    <fs-provider name="MyFSProvider">
        <fs-bus busid="fileChannel1">
            <fs-message-filter directory="C:\fileIngestion\test1"
                error-delete="false" error-directory="C:\fileIngestion\error"
                input-suffix=".txt" post-delete="false" post-directory="C:\fileIngestion\complete" />

        </fs-bus>
        <fs-bus busid="fileChannel2">
            <fs-message-filter directory="C:\fileIngestion\test2"
                error-delete="false" error-directory="C:\fileIngestion\error"
                input-suffix=".txt" post-delete="false" post-directory="C:\fileIngestion\complete" />
        </fs-bus>
    </fs-provider>