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 IndexWebSphere Message Broker SupportResetContent descriptor and Asbitstream+parse

Post new topicReply to topic
ResetContent descriptor and Asbitstream+parse View previous topic :: View next topic
Author Message
JunnyJose
PostPosted: Thu May 10, 2018 1:31 am Post subject: ResetContent descriptor and Asbitstream+parse Reply with quote

Newbie

Joined: 10 May 2018
Posts: 3

Can somebody help me to understand the below topics clearly ?

Is reset content descriptor and Asbitstream+parse does the same functionality?Can somebody explain clearly about this two topics?

If so why it is recommended to use Asbitream+parse instead of ResetContentDescriptor to avoid performance hit?

Does the below code only validates the message while converting to bitstream or it parses as well ?

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN

CALL CopyMessageHeaders();

DECLARE Test BLOB;

DECLARE opts INTEGER BITOR(RootBitStream,
ValidateContent,
ValidateValue,
ValidateFullConstraints,
ValidateException,
ValidateComplete);

SET Test = ASBITSTREAM(InputRoot.*[<] OPTIONS opts
ENCODING COALESCE(InputRoot.Properties.Encoding, 0)
CCSID COALESCE(InputRoot.Properties.CodedCharSetId, 0)
SET InputRoot.Properties.MessageSet
TYPE InputRoot.Properties.MessageType
FORMAT InputRoot.Properties.MessageFormat);

RETURN TRUE;
END;
Back to top
View user's profile Send private message
timber
PostPosted: Thu May 10, 2018 3:44 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 816

Good question.

ResetContentDescriptor does this:
1. Serialize the input message tree (i.e. do what an output node would do, and create a BLOB from it using whatever parser is attached to InputRoot.*[>] )
2. Parse the resulting BLOB using the parser/model specified in the RCD node properties
3. Optionally (if requested on the RCD node properties) validate while parsing

ASBITSTREAM followed by CREATE...PARSE is similar, but a little more flexible:
1. ASBITSTREAM: Serialize whatever input message tree was specified to create a BLOB
2. CREATE...PARSE: Parse the BLOB using the parser/model specified in the ESQL statement.
3. Optionall (if requested in the CREATE...PARSE flags) validate while parsing

Quote:
why it is recommended to use Asbitream+parse instead of ResetContentDescriptor to avoid performance hit?
That's not a Golden Rule of Message Flow Design. It it sometimes more efficient to reduce the number of nodes in the message flow to avoid the overhead of repeatedly copying the message tree. But Donald Knuth's well-known rule applies: "Premature optimisation is the root of all evil". I would advise you to design your message flows to be readable and maintainable, and only optimise when you need to.
Back to top
View user's profile Send private message
JunnyJose
PostPosted: Thu May 10, 2018 5:14 am Post subject: Reply with quote

Newbie

Joined: 10 May 2018
Posts: 3

Thanks a lot for the detailed explanation.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportResetContent descriptor and Asbitstream+parse
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.