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 » WebSphere Message Broker (ACE) Support » file input node is picking up the file before the copy is co

Post new topic  Reply to topic
 file input node is picking up the file before the copy is co « View previous topic :: View next topic » 
Author Message
sranjoy
PostPosted: Thu Dec 15, 2016 2:49 am    Post subject: file input node is picking up the file before the copy is co Reply with quote

Newbie

Joined: 15 Dec 2016
Posts: 3

Hi Team,
Environment : IIB9 broker on Windows
SFTP server is on unix.

We have requirement to process files via file input node.I am facing an issue when business is trying to copy a large file (50 MB) in input file path.File input node is picking up the file(zero byte file) before the copy is complete.Third party can change the file filename after copy is successfully complete or any other process .i have discussed with them .
Can we do any thing in IIB to resolve the issue ?please suggest
Back to top
View user's profile Send private message
timber
PostPosted: Thu Dec 15, 2016 4:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
Third party can change the file filename after copy is successfully complete or any other process .i have discussed with them .
That sounds like a viable solution to me.

btw, if you use the Search button you will find many other questions similar to yours.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 15, 2016 5:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

https://www.cs.virginia.edu/cs200/lectures/lecture26.ppt
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
sranjoy
PostPosted: Thu Dec 15, 2016 5:23 am    Post subject: Reply with quote

Newbie

Joined: 15 Dec 2016
Posts: 3

Quote:

btw, if you use the Search button you will find many other questions similar to yours.


I found some but of different scenerios.

I can only perform any action in IIB only.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 15, 2016 5:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sranjoy wrote:
I can only perform any action in IIB only.


Ignore IIB for a moment. Imagine you had a Java (or programming language of your choice) application that needed to read a large file, but couldn't start processing until the file was complete even though the file did actually exist on the file system as soon as the copy started. How would you fix this problem in that application?

Do the same with IIB.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Thu Dec 15, 2016 6:40 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 364
Location: Columbus, OH

sranjoy wrote:
Quote:

btw, if you use the Search button you will find many other questions similar to yours.


I found some but of different scenerios.

I can only perform any action in IIB only.


So what you said earlier
Quote:
Third party can change the file filename after copy is successfully complete

is no longer true?

The above is a typical way this is handled in a *nix environment.

Most places I've been at use .<filename> for the file in progress and then when the SFTP PUT is done it renames the file to <filename> (ie removes the period as the first character).

Dot files are also hidden in *nix 'ls' output unless you add the '-a' option.
Back to top
View user's profile Send private message
sranjoy
PostPosted: Thu Dec 15, 2016 11:04 pm    Post subject: Reply with quote

Newbie

Joined: 15 Dec 2016
Posts: 3

still waiting for any solution in IIB
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 15, 2016 11:36 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

sranjoy wrote:
still waiting for any solution in IIB


There is no solution in IIB that anyone here would recommend for production.

The solution is as has been suggested already and alluded to by yourself.
i.e.
Create the file with the wrong filename and when it is complete rename it so that the FileInput Node will pick it up.

This thread highlights a fundamental issue that you will encounter when using files.
Other message streams (eg MQ) do not make the end result available to a reader until it is complete and comitted to the queue.

I have banged my head against many brick walls in one part of the world where everyone insits on using FTP for everything including one site where there was already an MQ Channel between both ends. One PHB wanted us to implement a DR solution (where the DR Sites were 1500km apart) using files.
In the end, I gave up and retired.

To parody Douglas Adams,
Files are not the answer to anyhing including Life, the Universe and Everything. They are just a PITA even on a good day. Not even the Vogons would consider using files when planning their interstellar highway.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 16, 2016 5:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sranjoy wrote:
still waiting for any solution in IIB


Vitor wrote:

Ignore IIB for a moment. Imagine you had a Java (or programming language of your choice) application that needed to read a large file, but couldn't start processing until the file was complete even though the file did actually exist on the file system as soon as the copy started. How would you fix this problem in that application?

Do the same with IIB.


How much more of a solution do you want??
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
adubya
PostPosted: Fri Dec 16, 2016 6:28 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

Can you collect the file from the remote site rather than have them push it to you ? The FileInput node could do that.
_________________
Independent Middleware Consultant
andy@knownentity.com
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Dec 16, 2016 6:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

adubya wrote:
Can you collect the file from the remote site rather than have them push it to you ? The FileInput node could do that.


And how do you know the file is complete when you start to pull it? How do you know the process that creates it isn't running late?

This doesn't fix it the problem, it just moves it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
adubya
PostPosted: Fri Dec 16, 2016 6:48 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

OP, which SFTP server are you using on Windows ?
_________________
Independent Middleware Consultant
andy@knownentity.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » file input node is picking up the file before the copy is co
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.