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 File Name Generation

Post new topic  Reply to topic
 FileOutput File Name Generation « View previous topic :: View next topic » 
Author Message
murdeep
PostPosted: Wed Jul 22, 2009 9:10 am    Post subject: FileOutput File Name Generation Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

Hello, running WMB V6.1.0.4

I have a requirement to read grouped messages from a queue and produce a file. The catch is that I need to set the file name to contain the PutDate and PutTime of the first message in the group.

My question is how do I save the first grouped message PutDate/PutTime so that it can be used when I write out subsequent messages in the group? I also need to ensure when the next group arrives on the input queue that I calculate the new file name.

I have managed to recognize the first message of the group so I can filter on that to set the Date/Time but am having trouble saving it so I can reference it on subsequent gets of the other messages in the group.

I know there is a way to save info across gets in a variable but am having trouble recalling how to do that. Your help is appreciated.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Jul 22, 2009 9:22 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Use shared variables in ESQL.
Back to top
View user's profile Send private message
murdeep
PostPosted: Wed Jul 22, 2009 9:36 am    Post subject: Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

Thanks. For the life of me I couldn't recall this but know that you mention it it's obvious.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Wed Jul 22, 2009 11:49 pm    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Of course you are treating the group as one transaction arent you....

What if this UOW becomes very large?

If not, what happens if the broker goes down after processing the first message in the group?

An alternative might be to store a mapping between groupids and put date / time in a DB and then look this up for subesquent messages of the group.

Just my quick thoughts.
Back to top
View user's profile Send private message
murdeep
PostPosted: Thu Jul 23, 2009 8:45 am    Post subject: Reply with quote

Master

Joined: 03 Nov 2004
Posts: 211

I am consuming the msg group as as single UOW (i.e. Logical order is checked, All messages available is checked and Commit by message group is checked on the MQInput node). So if the broker abends the messages should be backed out. On subsequent reprocessing the FileOutput node will see the file already exists and I have configured the node to archive the previously created partial file before writing out the new file.

I thought about storing the groupid, date and time but after analyzing this I don't believe that will buy me anything. Correct me if I am wrong.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Thu Jul 23, 2009 9:26 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

murdeep wrote:
I am consuming the msg group as as single UOW (i.e. Logical order is checked, All messages available is checked and Commit by message group is checked on the MQInput node).


just checking

Quote:

I thought about storing the groupid, date and time but after analyzing this I don't believe that will buy me anything. Correct me if I am wrong.


I was just thinking that if the UOW grew too big you could break the work down into smaller chunks and if the broker restarted it would be able to continue processing without needing the 1st message again. If you've already considered all this (and it sounds like you have) then ill say no more
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 File Name Generation
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.