ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ File Transfer Edition » Question on MQ FTE Trigger Mechanism

Post new topic  Reply to topic
 Question on MQ FTE Trigger Mechanism « View previous topic :: View next topic » 
Author Message
tatyeong
PostPosted: Tue Apr 27, 2010 11:24 pm    Post subject: Question on MQ FTE Trigger Mechanism Reply with quote

Acolyte

Joined: 16 Apr 2010
Posts: 52

Hi

I would like to use the trigger mechanism in MQ FTE to start a file transfer after a file has been placed in the specific folder.

My question is how does FTE agent knows that the file creation process has completed before starting the transfer? Say if the program is still in the middle of writing into the file, will the FTE agent start transferring the file?

Or do I have to write the file to a staging folder, and move it to a final folder after the program has finished writing. FTE agent will monitor the final folder and transfer once it detects the file there
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Apr 28, 2010 12:29 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Within my limited knowledge of the product...I believe it is possible to have a 'trigger' file written to a monitored location that will cause a transfer to take place, and the file to be transferred can be in a different location from the monitored location, e.g. write your file to be transferred in one location and when complete, write the trigger file to the monitored location.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
tatyeong
PostPosted: Wed Apr 28, 2010 1:04 am    Post subject: Reply with quote

Acolyte

Joined: 16 Apr 2010
Posts: 52

Yup, that can be done, just wondering if it is possible where the monitor file is also the file to be transferred

Say if the file to be transferred is test.txt in /outbound folder. Can I set a trigger condition based on the "if file exists" condition to monitor test.txt? When the program generates test.txt, will FTE starting transfering the file while the file is being generated?
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Apr 28, 2010 1:42 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Logic would suggest not, but the documentation will confirm/deny...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Apr 28, 2010 3:17 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi tatyeong,

If the file is being put by the FTE agents, then for sure you cannot pick until the entire transfer of the file is done.

If another application is putting the file, then I would imagine that you shouldn't be able to pick the file until its closed/released...but I'm not sure too. You can easily test this by putting the file into the directory by keeping it in edit mode.

Regards.
Back to top
View user's profile Send private message Send e-mail
mphillip
PostPosted: Mon May 10, 2010 2:13 am    Post subject: Reply with quote

Apprentice

Joined: 03 Feb 2009
Posts: 49

FTE Monitors are not great in this area. If you have a monitor watching a directory for files, as soon as the file appears then FTE will try to transfer it, whether the writing application has finished writing it or not. This can result in a failed transfer if FTE can't get a lock on the file.

If the writing application updates the file's last modified timestamp at the end of the write, then FTE will try to transfer it again, however if it doesn't then it won't.

It's not great and certainly could be better.

Possible options:
Write a trigger file after the main file has been written and monitor for the trigger file (transferring the main file)

Write the file to a temporary location and do a local OS move when it's all written (as a move is pretty much atomic, so you don't get the locking issues)

Write the main file with a temporary name, renaming it when it's complete (e.g. write file.tmp, and rename to file.txt when it's done, monitoring for *.txt). Note it's not possible at the moment to monitor for everything except something (e.g. you can't monitor for everything except *.tmp)
Back to top
View user's profile Send private message
Prabhat_Choubey
PostPosted: Wed Feb 06, 2013 11:58 am    Post subject: Reply with quote

Newbie

Joined: 06 Feb 2013
Posts: 2

Adding further I would suggest go fo nosizechange=2 in monitor trigger codition,this will allow only those files to be picked which are unchanged in size for two consecutive checks
Back to top
View user's profile Send private message
nickla23
PostPosted: Mon Feb 11, 2013 7:13 am    Post subject: Reply with quote

Novice

Joined: 06 Dec 2012
Posts: 12

On Unix systems it will wait for an exclusive lock by default, if you are on Windows it would be good to add the mandatory lock property into your agent.properties (enableMandatoryLocking=true) so that you don't initiate a transfer prior to the file being ready.

I'd also ensure you are excluding .part from your monitor so you don't pick up the build file.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ File Transfer Edition » Question on MQ FTE Trigger Mechanism
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.