Author |
Message
|
Prasi |
Posted: Wed Dec 04, 2013 2:57 pm Post subject: FileInput Node-Records not reading correctly each time |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
Hi,
I have a 4 applications with FileInput node which listens to the same directory. I am putting 3 files in the folder each having 10 records. When I am starting the flow,one time it reads all 10 records and the next time it reads only 9 records and sometimes it reads only 8 records. This is weird. Can someone please help me? |
|
Back to top |
|
 |
hcinko5 |
Posted: Thu Dec 05, 2013 5:10 pm Post subject: |
|
|
 Novice
Joined: 12 Apr 2010 Posts: 21
|
Quote: |
I have a 4 applications with FileInput node |
Do you mean 4 WMB Applications deployed at the same time?
What are the settings on "Record detection"?
When the test is made, are the 3 files being put at the same time? |
|
Back to top |
|
 |
Prasi |
Posted: Thu Dec 05, 2013 6:13 pm Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
Yes all WMB applications are deployed at the same time. The record detection is delimited. Yes, all 3 files are put at the same time. |
|
Back to top |
|
 |
zpat |
Posted: Fri Dec 06, 2013 12:43 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I hope you mean four instances of the same flow?
To have four different "applications" reading the same directory would seem a bad idea.
Always debug things in a simple case first. One flow (one instance), one file at a time.
Get that working first. Then send several files. _________________ 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 |
|
 |
Prasi |
Posted: Fri Dec 06, 2013 5:43 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
Yes, with one application and with four files at a time works fine. The problem is with 3 or 4 applications. |
|
Back to top |
|
 |
zpat |
Posted: Fri Dec 06, 2013 5:55 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Again - do you mean four instances of the same "application" (we call them message flows)?
Why on earth would you want four different applications picking files from the same directory? _________________ 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 |
|
 |
smdavies99 |
Posted: Fri Dec 06, 2013 6:20 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Quote: |
Why on earth would you want four different applications picking files from the same directory?
|
This is not that strange to me. They could all be looking for different filename patterns. _________________ 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 |
|
 |
zpat |
Posted: Fri Dec 06, 2013 6:35 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I realise that - but it can lead to confusion and the implication of these posts is that the files are of the same sort.
Either way - keeping it simple (and separate) is the best way in my view.
Otherwise a change of a file mask for one app - might suddenly result in a conflict with another one (that the developer was unaware of). |
|
Back to top |
|
 |
Prasi |
Posted: Fri Dec 06, 2013 7:28 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
4 applications means 4 version of the same message flow where the FileInput is pointing to the same input directory. Based on logic, the file will be routed to different output queues whichever is available. |
|
Back to top |
|
 |
Esa |
Posted: Fri Dec 06, 2013 7:33 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Prasi wrote: |
4 applications means 4 version of the same message flow where the FileInput is pointing to the same input directory. Based on logic, the file will be routed to different output queues whichever is available. |
You are probably using wrong terminology. Do you mean that you have deployed the same flow on 4 execution groups?
Or have you configured one flow to use 3 additional instances? |
|
Back to top |
|
 |
Prasi |
Posted: Fri Dec 06, 2013 7:39 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
I am sorry for not being clear. I just meant to say that except for the output routing rest all logic remains the same. All four applications/message flows are deployed to the same EG and listening to the same input directory. |
|
Back to top |
|
 |
zpat |
Posted: Fri Dec 06, 2013 7:49 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Do all the flows specify the same file mask on the same directory?
If so, why would the logic be different for each one?
Seems to me that you should put all this into one flow - if you find yourself coding flows where most of the logic is the same - then you should combine it into one flow (with subflows for the parts that need to be different).
You might only need one instance of the flow - if the routing logic is internal to that flow and everything becomes a lot simpler then.
As always - look for simple, single threaded solutions before starting off on a complex (usually unnecessarily so) design that then has quirky behaviour (leading you to this problem for example).
Last edited by zpat on Fri Dec 06, 2013 7:52 am; edited 3 times in total |
|
Back to top |
|
 |
Esa |
Posted: Fri Dec 06, 2013 7:50 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Prasi wrote: |
All four applications/message flows are deployed to the same EG and listening to the same input directory. |
Prasi wrote: |
4 applications means 4 version of the same message flow where the FileInput is pointing to the same input directory. |
So you have renamed the flow to be able to deploy it four times on the same execution group?
Why didn't you just allow one flow to start additional instances?
Check mqsitransit directory under the input directory. Are there any files?
Have you configured any exception handling in the flow(s)? Are catch or failure terminals connected? |
|
Back to top |
|
 |
Prasi |
Posted: Fri Dec 06, 2013 9:38 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
I dont have any files in the mqsitransit directory. I do have connected the failure terminals. But I am not getting errors in the event viewer too.. |
|
Back to top |
|
 |
Esa |
Posted: Fri Dec 06, 2013 9:48 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
So all files end up in the correct output queues but sometimes they don't have all the records?
Prasi wrote: |
Based on logic, the file will be routed to different output queues whichever is available. |
Then there is something wrong with that logic, too. Is it ESQL, are you using SHARED variables?
Have you run user trace?
Putting a trace node with ${Root} after the File Input should tell if all records are read. |
|
Back to top |
|
 |
|