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 » FileOutput node design question

Post new topic  Reply to topic
 FileOutput node design question « View previous topic :: View next topic » 
Author Message
next
PostPosted: Tue Jun 14, 2011 1:53 am    Post subject: FileOutput node design question Reply with quote

Voyager

Joined: 02 May 2010
Posts: 75

Hi

I have a requirement like the messages will be read from the queue and written to multiple files.

I am setting the name of the file in the LocalEnvironment.Destination.File.name and writing the files. But when i try to finish the files, i have to remember the names of the files written for finishing them.

Finish file terminal doesnt take wild card matches for finishing the file.
Is there any way i can finish all the files in one directory at once?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 14, 2011 2:00 am    Post subject: Re: FileOutput node design question Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

next wrote:
Is there any way i can finish all the files in one directory at once?


No.

That would kind of be like telling a database to commit all outstanding transactions.
Back to top
View user's profile Send private message
next
PostPosted: Tue Jun 14, 2011 2:20 am    Post subject: Reply with quote

Voyager

Joined: 02 May 2010
Posts: 75

Thanks for your reply.

Having said we cant finish all the files at once, is it a good design to write the names of the files in a message put in a queue and check the message for the file names for each transction using MQGet node and finish all the files finally?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 14, 2011 2:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's a good design, provided that other design options aren't better.

First design question: Why are you leaving the files open in the first place?
Second design question: How do you know when any file or all files are supposed to be closed?
Third design question: How *sure* are you that a specific file is really ready to be closed?
Fourth design question: Do you need to use a separate message flow to close the files?
Back to top
View user's profile Send private message
next
PostPosted: Tue Jun 14, 2011 2:35 am    Post subject: Reply with quote

Voyager

Joined: 02 May 2010
Posts: 75

First design question: Why are you leaving the files open in the first place?

The messages are coming from different stores and i create files for each store. We need to append the messages to the file for a day.

Second design question: How do you know when any file or all files are supposed to be closed?

The files have to be closed at store closure. May be a particular time every night.

Third design question: How *sure* are you that a specific file is really ready to be closed?

At store closure, there wont be any messages.

Fourth design question: Do you need to use a separate message flow to close the files?

In the same flow, i can put another MQInput node to trigger the finish file job.


Please let me know your thoughts.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 14, 2011 4:13 am    Post subject: Reply with quote

Grand High Poobah

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

Why not accumulate the messages in a queue(s) during the day, and use a scheduled job to read & produce each of the files in a single go, finishing the file at end of messages?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 14, 2011 4:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I would prefer to have the stores send an explicit "end of day" message.

That way you don't have to worry about if a store happens to be running slow one day or etc. etc. etc.

But I'd also prefer to accumulate data into a database rather than a file, and then use the end of day to trigger a flow that pulls from the database.
Back to top
View user's profile Send private message
next
PostPosted: Tue Jun 14, 2011 4:38 am    Post subject: Reply with quote

Voyager

Joined: 02 May 2010
Posts: 75

I am not sure if accumulating messages in queues is good...considering the performance and the QM may go down in case of heavy load.

Is it a right idea to read and write message in a queue ? or is it good to use database to avoid reading and writing of the same message?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 14, 2011 4:46 am    Post subject: Reply with quote

Grand High Poobah

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

next wrote:
I am not sure if accumulating messages in queues is good...considering the performance and the QM may go down in case of heavy load.


How many messages are you talking about here? What platform is the queue manager running on? A lot of of people use WMQ for message volumes in the tens of thousands at very high transmission rates. Likewise WMB doesn't balk at working hard.

Clearly if you've got a queue manager & broker running on a small Windows box using the default configuration with no attempt at sizing then you could hit a problem. Until you correctly size them.

next wrote:
Is it a right idea to read and write message in a queue ? or is it good to use database to avoid reading and writing of the same message?


If you have access to a database, why are you writing to files at all? Accumulate the messages into the database on arrival and use a scheduled job to extract information for whatever end-of-day processing these files go into. Not only does this eliminate your file problem, but allows for future end-of-month & end-of-year processing.

Keeping business data in a database? Radical but I'm in the mood to push the envelope...
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » WebSphere Message Broker (ACE) Support » FileOutput node design question
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.