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 » File Node

Post new topic  Reply to topic
 File Node « View previous topic :: View next topic » 
Author Message
8corkery
PostPosted: Fri Dec 19, 2008 6:56 am    Post subject: File Node Reply with quote

Newbie

Joined: 19 Dec 2008
Posts: 5

Wondering if someone can help me.
Im using WMB v6.1 and i had a question about the file node.
could i use the file node to parse a file with the structure similar to below and propagate out the individual <message> nodes for processing.
<root>
<Message>test1</Message>
<Message>testtwo</Message>
<Message>testthree</Message>
</root>

also what would happen is there was an error in processing one of these separate message, would they all be in error or just the individual, by this i mean are they still all related while being processed.
thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 19, 2008 6:59 am    Post subject: Re: File Node Reply with quote

Grand High Poobah

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

8corkery wrote:
could i use the file node to parse a file with the structure similar to below and propagate out the individual <message> nodes for processing.


Yes. IMHO you'd need a Compute node as well.


8corkery wrote:
what would happen is there was an error in processing one of these separate message, would they all be in error or just the individual, by this i mean are they still all related while being processed.


Depends on how you set the UOW.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
8corkery
PostPosted: Fri Dec 19, 2008 7:05 am    Post subject: Re: File Node Reply with quote

Newbie

Joined: 19 Dec 2008
Posts: 5

Vitor wrote:
8corkery wrote:
could i use the file node to parse a file with the structure similar to below and propagate out the individual <message> nodes for processing.

Yes. IMHO you'd need a Compute node as well.


Ok i assume you are saying the file node can parse the inbound file but the compute node would have to be the one breaking the message up ?

Vitor wrote:

8corkery wrote:
what would happen is there was an error in processing one of these separate message, would they all be in error or just the individual, by this i mean are they still all related while being processed.


Depends on how you set the UOW.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 19, 2008 7:10 am    Post subject: Re: File Node Reply with quote

Grand High Poobah

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

8corkery wrote:
Ok i assume you are saying the file node can parse the inbound file but the compute node would have to be the one breaking the message up ?


AFAIK the File node can't propogate individual records to downstream nodes. I'll accept correction on this point.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqmatt
PostPosted: Fri Dec 19, 2008 7:36 am    Post subject: Re: File Node Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Vitor wrote:
8corkery wrote:
Ok i assume you are saying the file node can parse the inbound file but the compute node would have to be the one breaking the message up ?


AFAIK the File node can't propogate individual records to downstream nodes. I'll accept correction on this point.

FileInput can break files into separately propagated records using either fixed-length, delimiter or by using a parser.
However, it can't parse embedded records eithin a single message format, such as the <Message> elements in the original poster's example.
Back to top
View user's profile Send private message
8corkery
PostPosted: Fri Dec 19, 2008 7:40 am    Post subject: Re: File Node Reply with quote

Newbie

Joined: 19 Dec 2008
Posts: 5

mqmatt wrote:
Vitor wrote:
8corkery wrote:
Ok i assume you are saying the file node can parse the inbound file but the compute node would have to be the one breaking the message up ?


AFAIK the File node can't propogate individual records to downstream nodes. I'll accept correction on this point.

FileInput can break files into separately propagated records using either fixed-length, delimiter or by using a parser.
However, it can't parse embedded records eithin a single message format, such as the <Message> elements in the original poster's example.


i thought as much, i just wanted to check. thanks for the info
Back to top
View user's profile Send private message
8corkery
PostPosted: Fri Dec 19, 2008 8:11 am    Post subject: Re: File Node Reply with quote

Newbie

Joined: 19 Dec 2008
Posts: 5

In this case i have been thinking of using the file node merely to detect the arrival of the file and retrieve the file location and name of the inbound file and then somehow pass this information to WTX to pick up the file and parse it. The reason i would do this is that the files maybe very very large.
Is there a way to pick up a file without reading it into memory?
For example if i parsed with XMLNSC would it read the whole tree into memory or just a single element thus being more efficient then reading the whole blog.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 19, 2008 8:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The FileInput node does use the streaming memory model.

I think mqmatt's comment may be a bit more precise in the use of the word "message" than you may think.
Back to top
View user's profile Send private message
8corkery
PostPosted: Fri Dec 19, 2008 9:03 am    Post subject: Reply with quote

Newbie

Joined: 19 Dec 2008
Posts: 5

mqjeff wrote:
The FileInput node does use the streaming memory model.

I think mqmatt's comment may be a bit more precise in the use of the word "message" than you may think.


So in the case we had a 500Mb file that the file handler cannot break up would it load the whole 500mb into memory ?
and if so is there a way we could stop this and only load contents as we need it like XMLNSC does (well i think thats what it does, im new to all of this)
Back to top
View user's profile Send private message
mqpaul
PostPosted: Tue Jan 06, 2009 6:04 am    Post subject: Streaming means the XMLNSC parser only reads what it needs Reply with quote

Acolyte

Joined: 14 Jan 2008
Posts: 66
Location: Hursley, UK

Quote:
So in the case we had a 500Mb file that the file handler cannot break up would it load the whole 500mb into memory ?
and if so is there a way we could stop this and only load contents as we need it like XMLNSC does (well i think thats what it does, im new to all of this)


The FileInput node passes the parser an I/O stream connected to the file. So the parser might read say 32K of input, and start parsing that. Depending on what happens next, it might throw those 32K away and read the next 64K, and so on. That's for the "streaming" parsers - XMLNSC, MRM-CWF and MRM-TDS. Other parsers would read all 500 Mb.

If memory use is important, you need to take care to "prune" the message tree, as otherwise it will ultimately grow to at least as large as the source message. Look at the "Large Messaging Sample" in the toolkit to see how to do this. Of course, these days 500 Mb isn't so much.
_________________
Paul
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 » File Node
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.