Search code examples
integrationmessagebroker

Relative directory to read file


I am using IBM Integration Bus v.9

I try to read configuration from file, like this tutorial.

Based on the documentation, I've already set up my environment variable in Windows like this : MQSI_FILENODES_ROOT_DIRECTORY to C:\MQSIFileInput

In the File Read Node properties, i set input directory to "config" (without apos), because the file located in C:\MQSIFileInput\config directories.

When I run, i got error "The directory config is not a valid directory name". What am I missing here? Do I need to set up another configuration to read the file properly?

Thank you.


Solution

  • The MQSI_FILENODES_ROOT_DIRECTORY variable needs to be visible to the ExecutionGroup process at startup, so first thing to check is how did you set the env var and did you restart the broker?

    Due to the way that processes are forked on windows the process for setting env vars is usually something like:

    Stop broker Close Broker Command Prompt Modify mqsiprofile.cmd to include variable Open new Broker Command Prompt Verify env var is set ie/ echo %MQSI_FILENODES_ROOT_DIRECTORY% Start Broker

    The directory also needs to be readable by the Broker's process ID (and writable if you will be deleting the file or moving it to a backout dir etc).