Author |
Message
|
firoj.badsa |
Posted: Sat Dec 17, 2011 7:40 am Post subject: FileInput node -- 'File Not Available' |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
Hi all,
I am working for a requirement where I have to do a FTP on a server and transfer the files to a target server.. It works fine as expected. But I have a extra requirement where I have to send a message 'File Not available' when there is no message during a poll on the server. Anybody can help me on this?
Thanks in advance,
Firoj |
|
Back to top |
|
 |
mqjeff |
Posted: Sat Dec 17, 2011 9:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So when you poll every 30 seconds, you're going to send a message every 30 seconds? |
|
Back to top |
|
 |
firoj.badsa |
Posted: Sat Dec 17, 2011 11:11 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
Yes, as per the requirement, every poll file should be transferred.. If it is not there some event should be posted.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Dec 17, 2011 1:37 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
firoj.badsa wrote: |
Yes, as per the requirement, every poll file should be transferred.. If it is not there some event should be posted.. |
This additional requirement needs to be managed by some scheduler software:
if file such and such not found by timestamp x do action y....
This is not a broker requirement!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
firoj.badsa |
Posted: Sat Dec 17, 2011 8:39 pm Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
Ok.. agreed scheduling is not broker job .. thats why we can provide only time interval in Fileinput node. But indeed when polling happens and there is no file file available.. we can expect broker to throw some error... If not .. better say that .... this is not available in broker .. i do not agree this is not a broker requirement... |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 18, 2011 1:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
firoj.badsa wrote: |
Ok.. agreed scheduling is not broker job .. thats why we can provide only time interval in Fileinput node. But indeed when polling happens and there is no file file available.. we can expect broker to throw some error... If not .. better say that .... this is not available in broker .. i do not agree this is not a broker requirement... |
So you want to set the polling on your file input node to once a day?
As I said, this needs to be covered by a scheduling package whose job it is to report about such things. The broker will only process the file if present...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Dec 18, 2011 9:04 am Post subject: Re: FileInput node -- 'File Not Available' |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
firoj.badsa wrote: |
But indeed when polling happens and there is no file file available.. we can expect broker to throw some error... |
The FileInput node does not throw some error in this case. It re-polls indefinitely, and won't do anything else until a file becomes available. It is possible to develop a custom plugin that can throw errors when needed, to replace the FileInput node, but it may be easier to handle this requirement outside the broker.
firoj.badsa wrote: |
If not .. better say that .... this is not available in broker .. |
The InfoCenter describes in more detail how the FileInput node works. |
|
Back to top |
|
 |
firoj.badsa |
Posted: Sun Dec 18, 2011 9:28 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
@rekarm01 Yes, I know whats there in info center. I did not expected you to explain here how fileinput node works. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Dec 18, 2011 1:48 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So, okay.
You can configure the FileInput node. You can wire this to a FileOutput node that will rewrite the file to a local directory.
You can wire a TimeoutNotification to a FileGet node.
EDIT:
Or you can enable monitoring, and use something that can decide that an event has not been produced at the correct time. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 20, 2011 6:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
firoj.badsa wrote: |
But indeed when polling happens and there is no file file available.. we can expect broker to throw some error |
No you can't expect that. Not just because it's not how the InfoCenter says the feature works.
We seem to have agreement that scheduling is not a broker job. So we agree that broker is not picking up files according to a schedule (i.e. once per scheduled interval) where it expects a file to be present. It's polling for a file at a determined interval to see what's there, if anything. This in my view is a fairly standard industry definition of "polling". If broker does not run to a schedule, it's unreasonable to expect it to notice the schedule has not been maintained.
firoj.badsa wrote: |
If not .. better say that .... this is not available in broker .. |
It's not available in broker. You'll need to build someting using the suggestions given, or your own plan.
firoj.badsa wrote: |
i do not agree this is not a broker requirement... |
I don't agree with you, but there's no good reason why you can't submit this as a future enhancement; it doesn't sound like a hard technical challenge to modify the FileInput node to either poll on an interval or read a directory on a schedule.
Of course the IBM development team may well disagree with my technical assessment, and of course retain sole discression on when & if they will deliver such an enhancement. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|