|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Accessing a file |
« View previous topic :: View next topic » |
Author |
Message
|
Sam Uppu |
Posted: Mon Mar 01, 2010 6:36 am Post subject: Accessing a file |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Hi Guys,
We have requirement where we store certain data in a file and have to access the file in the message flow, compare some of the contents with the incoming message and do further processing.
Can we access a file from compute node? If so pls let me know.
Thanks |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Mar 01, 2010 6:48 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
This sort of requirement is probably more suited to using a database rather than a file.
There are some alternative options to use a timer node to read the file into shared variables s othat you don't have to read the file every time a new message arrives. That is, if you really have to use a file for this.
Ask the people who wrote the requirement how often the file will change (if ever). If the answer is never or rarely then you should'nt really be using a file.
You can't use a Compute node unless you call some java code from it. _________________ 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 |
|
 |
Vitor |
Posted: Mon Mar 01, 2010 7:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
smdavies99 wrote: |
This sort of requirement is probably more suited to using a database rather than a file. |
Especially if the file contains business rules or configuration data; there are much better places to store that sort of thing.
There's been a recent discussion (which I'm too lazy to search for) regarding the experience of information being put into files at the client's insistence so it can be "changed at a moment's notice according to the needs of the changing business" and remaining unchanged for years. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Mon Mar 01, 2010 7:49 am Post subject: Re: Accessing a file |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Sam Uppu wrote: |
Hi Guys,
We have requirement where we store certain data in a file and have to access the file in the message flow, compare some of the contents with the incoming message and do further processing.
|
This is NOT a requirement, it is one possible (and probably inadvisable) solution.
I would suggest using a database table or even a message queue (to browse), and then for performance reasons keeping the data values in ESQL shared variables for subsequent invocations to use.
If the data has to originate from a file, have a separate message flow with a fileinput node load new versions into the database table or message queue.
That way you can update it by dropping a file into a directory, but the regular flows use the database or message, with most flow instances finding the data already cached in shared variables.
As I have said before, if you can't use standard WMB features, then either IBM (after 10 years continuous improvement) have their product design wrong, or you have your solution design wrong. Guess which? |
|
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
|
|
|
|