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 » message parsing doubts

Post new topic  Reply to topic
 message parsing doubts « View previous topic :: View next topic » 
Author Message
vmurali_au
PostPosted: Mon May 15, 2006 6:26 am    Post subject: message parsing doubts Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

I've created a msg set with message

<Employee>
<EmpName>John</EmpName> (String)
<EmpNo>123</EmpNo> (Integer)
<Salary>1000</Salary> (decimal)
</Employee>

MQInput -> Compute -> MQOutput

I've selected Validate = None and Parse Timing = "On-Demand" in both in MQInput and Compute. MQOutput validate i've put as Validate = none

When i pass a msg with no salary field the flow works fine without any errors. BUt when i pass a msg with salary field set to a character value instead of decimal value i get an exception in the MQInput node and the flow fails at MQOutput node. The thing i dont understand is when i put "Validate = none" why broker tries to validate the msg with the msg set. Also i've selected "On-Demand" parsing. So it shudnt try to parse the msg in MQInput node.

Actually i'm trying to verify whether the Broker actually uses partial parsing. In our project we are planning to have the routing info at the top portion of msg and parse only till that and use it for routing.

In this flow i dont see any difference when i select "Parse Timing = Complete" or "Parse Timing = On-Demand" . Please help me in understanding the usage of both.
Back to top
View user's profile Send private message
EAI Developer
PostPosted: Mon May 15, 2006 6:50 am    Post subject: Reply with quote

Centurion

Joined: 30 Nov 2005
Posts: 101
Location: US

Quote:
In this flow i dont see any difference when i select "Parse Timing = Complete" or "Parse Timing = On-Demand" . Please help me in understanding the usage of both.



General message options are used in combination with validation tab.put validation as "content and value" and try to change the values in parse timing,,then u can see the difference.



Cheers,
EAI Developer.
Back to top
View user's profile Send private message Visit poster's website
vmurali_au
PostPosted: Mon May 15, 2006 7:13 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

The main thing i'm not able to understand is even with validation = none i'm getting message parsing errors in MQInput node (Parse timing = on-demand)

First i sent a msg with no salary field. It went on without any errors.
Then i sent msg with salary field set to some character string and not decimal. Then i got exception in MQInput node.

Why broker tries to validate the msg in MQInput node when i specifically mentioned it not to? also when i set parse timing to "On-Demand"
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Mon May 15, 2006 7:23 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

For verifying whether broker uses partial parsing i'm planning this particular scenario

Send Employee msg with Salary field set to character strings and not decimal. Set the following properties

MQInput:
Parse Timing = On-Demand
Validation = none

Compute:
Parse Timing = On-Demand
Validation = none
In ESQL access only the EmpName and EmpNo fields and not the salary field. If broker uses partial on-demand parsing then the msg will go through without any errors as that field is not accessed.

MQOutput:
Validation = none
msg with the invalid salary field will be outputed successfully as the validation is turned off.

I'm trying the above scenario. But when i send the msg with invalid salary field i'm getting exception in MQInput node and the flow fails after MQOutput node. Exception being "Invalid datatype in msg tree".

I also feel that in this scenario if i set Parse Timing = "complete" instead of "on-demand" in both MQInput & Compute nodes, the the broker will try to parse the whole msg tree at which time it will catch the invalid salary field and throw an exception. Will this happen?

But currently i'm getting the parse exception even with the ParseTiming = "On-Demand"

Please help me in understanding the Partial Parsing and the use of Parse-Timing property values.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon May 15, 2006 7:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
The thing i dont understand is when i put "Validate = none" why broker tries to validate the msg with the msg set.
This is not a validation error - it's a data conversion error. If you have modeled 'Salary' as a numeric field, then the broker will try to convert your input string into a number. If that's impossible, it must throw an exception. It has no option, regardless of the Validation settings.
Quote:
Actually i'm trying to verify whether the Broker actually uses partial parsing
It definitely does. In fact, many people have the opposite problem to yours - partial parsing prevents their content validation from kicking in!
Quote:
I also feel that in this scenario if i set Parse Timing = "complete" instead of "on-demand" in both MQInput & Compute nodes, the the broker will try to parse the whole msg tree at which time it will catch the invalid salary field and throw an exception. Will this happen?
Yes it will.
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Mon May 15, 2006 7:46 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

Thanks Kimbert.

But i still cant get an idea of how to verify whether broker actually uses partial parsing with my example. I know IBM infocenter says so, but in our project we are planning to set the routing fields in the top of the message and other payload data below and refer only to the fields above (using partial parsing capabilty of broker) for routing.

We want to use this kind of design for performance reasons. We dont want to parse the whole msg to just get it routed. Also we cant use the usr folder available in MQRFH2, else we wud have already used that for routing purposes.

As we are in the design stage, it is quite important that we do the above scenario validation so that we dont assume things and endup in problems later on in the project.

If someone has tried partial-parsing capability and also can suggest an scenario or example (simple flow) it will be really helpful.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon May 15, 2006 7:52 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The best (maybe the only) way to check is to conduct a performance test. Create a huge XML document ( say 80MB ) and route it through your flow with parse timing set to On Demand. Then do the same with Parse Timing set to 'Complete'. You will definitely notice a difference.
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Mon May 15, 2006 7:56 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

Thanks once again.

But creating a huge 80MB XML file will itself be quite a project
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 16, 2006 12:45 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Not really. Take a 1Kb XML structure. Copy and paste to obtain a 2Kb structure. Repeat another 14 times and your document is 65536K ( which is quite large enough!).
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 » message parsing doubts
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.