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 » Basic in ESQL

Post new topic  Reply to topic
 Basic in ESQL « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Sat Jan 22, 2011 8:13 pm    Post subject: Basic in ESQL Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

There are two default Procedures in ESQL, "CopyMessageHeaders" and "CopyEntireMessage".

The Message Headers are all copied with the Procedure "CopyEntireMessage", even when the "CopyMessageHeaders" is commented. Then what is the purpose of this "CopyMessageHeaders" Procedure when the headers can be copied just by "CopyEntireMessage"?
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Jan 22, 2011 11:23 pm    Post subject: Re: Basic in ESQL Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kash3338 wrote:
Hi,

There are two default Procedures in ESQL, "CopyMessageHeaders" and "CopyEntireMessage".

The Message Headers are all copied with the Procedure "CopyEntireMessage", even when the "CopyMessageHeaders" is commented. Then what is the purpose of this "CopyMessageHeaders" Procedure when the headers can be copied just by "CopyEntireMessage"?

As Holmes would say: elementary my dear Watson!

The purpose is to only copy the headers when it does not make sense to copy the rest of the message into the output. (You need to alter the original message entirely or map the source to the target...)

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Sat Jan 22, 2011 11:37 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

AFAIK, CopyMessageHeaders is equivalent to
Code:

     CALL CopyEntireMessage();
     SET OutputRoot.<insert parser name here> = NULL;

OR

     CALL CopyEntireMessage()
     SET OutputBody = NULL;

_________________
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
View user's profile Send private message
fjb_saper
PostPosted: Sat Jan 22, 2011 11:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I thought there was a subtle difference, depending on whether you had parsing on demand set or not...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Sun Jan 23, 2011 9:06 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

fjb_saper wrote:
I thought there was a subtle difference, depending on whether you had parsing on demand set or not...


I'm not sure either BUT I raised this question at the WebSphere USers Group meeting last year at Hursley in the session on Broker Performance and thare was no clear answer forthcoming from the presenter or in the room itself.

Do any of the IBM'ers have an opinion on this one?
_________________
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
View user's profile Send private message
mqjeff
PostPosted: Sun Jan 23, 2011 11:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I believe that CopyEntireMessage, that is that Set OutputRoot=InputRoot; does not cause a full parse of InputRoot, whereas you run more of a risk if you iterate over the headers.

but I suspect mgk knows for sure /ducks/.
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Jan 24, 2011 4:27 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

If that is the case then is it not a performance issue to loop the entire headers information every time? I thought there was a specific reason behind these two default Procedures and thats why raised this question.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Jan 24, 2011 5:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The exact and specific reason for these two procedures is to provide an option to either set the entire OutputRoot tree to the entire InputRoot tree or to construct a copy of the InputRoot tree in the OutputRoot but without the body of the message.

It is not a performance hit to do either one of these. It takes a certain amount of time, and that time may be unexpected in certain cases. But it is not an impact of any kind outside of a specific set of predefined goals for stated performance requirements.

If you have no performance requirements, then it doesn't matter if you call CopyMessageHeaders() a thousand times in the same compute node.

If you have performance requirements, then you should be designing your flow with those in mind, including making sure to know when you actually need to copy the message at all.

These are simple helper routines designed to make certain common tasks readily available and easy to implement without failure. That's it.

If you don't like them, don't use them. But don't edit or change them, either, as that will make your code much harder to maintain.
Back to top
View user's profile Send private message
mgk
PostPosted: Mon Jan 24, 2011 5:34 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

So if you imagine a typical message, there is some header info (e,g, MQMD, RFH2) and a payload. In WMB, the Headers are everything except the body (including the Properties folder). Often the body of a message is many times larger than its headers. Therefore, CopyMessageHeaders can be a performance win if the body is large. The idea is that if you are transforming the body then you do not need to copy it - you build the output message from the input one. With SetOutputRoot = InputRoot; it will copy everything, and if the message has not yet been parsed, then this will be a fast bitstream copy. However, if it has been parsed, then it will be a tree copy instead...

Hope this helps...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.


Last edited by mgk on Mon Jan 24, 2011 5:57 am; edited 1 time in total
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jan 24, 2011 5:55 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Quote:
If you don't like them, don't use them. But don't edit or change them, either, as that will make your code much harder to maintain.


I had to laugh at that one.
At my current site, one compute node has had the 'CopyMessageHeaders' procedure modifed.
The mods were done by IBM software Services.....

The fact that it now relied on certain headers to be in a particular order makes the code totally unmaintainable...
I'd like to the person who did that.
_________________
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
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 » Basic in ESQL
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.