|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
FileInput Node - File lock |
« View previous topic :: View next topic » |
Author |
Message
|
johkar |
Posted: Mon Jul 10, 2017 5:53 pm Post subject: FileInput Node - File lock |
|
|
Novice
Joined: 27 Jan 2015 Posts: 16
|
I'm trying to understand when the FileInput node will start processing a file and am not finding definitive documentation. Is it upon the transferring agent to maintain a file lock until the file is fully written? Does the FileInput node wait until it can get a file lock if the record is the 'whole file'? If a file is FTPd to IIB should the agent transfer the file and then change permissions to where IIB can detect the file?
The gist is that I don't want the file to start processing until it is fully written and I'm looking for the best practice.
We are on IIB 10. Thanks. |
|
Back to top |
|
 |
zpat |
Posted: Mon Jul 10, 2017 10:43 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Good news and bad news.
The filenodes will use locks on the files.
Most other applications don't use file locks, as on the zany Unix OS - it is not the default.
Safest way is to transfer and rename in FTP (SFTP) and then use IIB masking to detect the final name _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 11, 2017 4:58 am Post subject: Re: FileInput Node - File lock |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
johkar wrote: |
I'm trying to understand when the FileInput node will start processing a file and am not finding definitive documentation. |
Because it's using OS level functions, so as to be platform independent.
johkar wrote: |
Is it upon the transferring agent to maintain a file lock until the file is fully written? |
Yes. Most transferring agents (and to my knowledge all FTP agents) don't bother to do so.
johkar wrote: |
Does the FileInput node wait until it can get a file lock if the record is the 'whole file'? |
It waits until it can get a file lock for any type of file, not just 'whole file'. All processed files are moved from the polled directory to the mqsitransitin directory to be actually processed, so the FileInput node needs enough access to the file to be able to move it to that directory. In most instances (as described above) it can get that access if the transfer is complete or not.
johkar wrote: |
If a file is FTPd to IIB should the agent transfer the file and then change permissions to where IIB can detect the file? |
Or FTP it to a different directory and move it once it's been completed.
johkar wrote: |
The gist is that I don't want the file to start processing until it is fully written and I'm looking for the best practice. |
No one ever does. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
johkar |
Posted: Tue Jul 11, 2017 5:43 am Post subject: |
|
|
Novice
Joined: 27 Jan 2015 Posts: 16
|
Sounds good. I just wanted to make sure I wasn't missing some documentation. Thanks. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|