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 » Properties versus MQMD

Post new topic  Reply to topic
 Properties versus MQMD « View previous topic :: View next topic » 
Author Message
mq_dummy
PostPosted: Fri May 17, 2013 1:50 am    Post subject: Properties versus MQMD Reply with quote

Newbie

Joined: 17 May 2013
Posts: 8

Hi all,

in the documentation I read the chapter "Properties versus MQMD folder behavior for various transports" (publib. boulder. ibm. com/ infocenter/ wmbhelp/ v7r0m0/ topic/ com.ibm.etools.mft.doc/ ac18520_.htm). (I really do not know, why I am not allowed to post links? Makes really sense.)
I tried to reproduce this behaviour in a test message flow. This flow has two alternative input nodes (MQInput and HTTPInput), a compute note which follows on both input nodes and behind the compute node there is a MQOutput node. The compute node has the code below.

Code:

CREATE COMPUTE MODULE testInput_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      DECLARE domainStr CHAR FIELDNAME(InputRoot.*[<]);

      -- 1
      CALL CopyEntireMessage();
      PROPAGATE;

      -- 2
      IF FIELDNAME(InputRoot.MQMD) IS NOT NULL THEN
         CALL CopyEntireMessage();
      END IF;
      SET OutputRoot.Properties.Encoding = 273;
       SET OutputRoot.Properties.CodedCharSetId = 850;

      SET OutputRoot.MQMD.Version             = MQMD_VERSION_2;
      SET OutputRoot.MQMD.Format              = MQFMT_STRING;
      SET OutputRoot.MQMD.MsgType               = MQMT_DATAGRAM;
      SET OutputRoot.MQMD.Feedback            = MQFB_NONE;
      SET OutputRoot.MQMD.BackoutCount         = 0;

      SET OutputRoot.MQMD.Encoding             = 546;
      SET OutputRoot.MQMD.CodedCharSetId          = 437;

       SET OutputRoot.{domainStr} = InputRoot.{domainStr};
       PROPAGATE;

      -- 3
      IF FIELDNAME(InputRoot.MQMD) IS NOT NULL THEN
         CALL CopyEntireMessage();
      END IF;
--      SET OutputRoot.Properties.Encoding = 273;
--       SET OutputRoot.Properties.CodedCharSetId = 850;

      SET OutputRoot.MQMD.Version             = MQMD_VERSION_2;
      SET OutputRoot.MQMD.Format              = MQFMT_STRING;
      SET OutputRoot.MQMD.MsgType               = MQMT_DATAGRAM;
      SET OutputRoot.MQMD.Feedback            = MQFB_NONE;
      SET OutputRoot.MQMD.BackoutCount         = 0;

      SET OutputRoot.MQMD.Encoding             = 546;
      SET OutputRoot.MQMD.CodedCharSetId          = 437;

       SET OutputRoot.{domainStr} = InputRoot.{domainStr};
       PROPAGATE;

      -- 4
      IF FIELDNAME(InputRoot.MQMD) IS NOT NULL THEN
         CALL CopyEntireMessage();
      END IF;
      SET OutputRoot.Properties.Encoding = 273;
       SET OutputRoot.Properties.CodedCharSetId = 850;

      SET OutputRoot.MQMD.Version             = MQMD_VERSION_2;
      SET OutputRoot.MQMD.Format              = MQFMT_STRING;
      SET OutputRoot.MQMD.MsgType               = MQMT_DATAGRAM;
      SET OutputRoot.MQMD.Feedback            = MQFB_NONE;
      SET OutputRoot.MQMD.BackoutCount         = 0;

--      SET OutputRoot.MQMD.Encoding             = 546;
--      SET OutputRoot.MQMD.CodedCharSetId          = 437;

       SET OutputRoot.{domainStr} = InputRoot.{domainStr};
       PROPAGATE;

      RETURN FALSE;
   END;

   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER 1;
      DECLARE J INTEGER;
      SET J = CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;

   CREATE PROCEDURE CopyEntireMessage() BEGIN
      SET OutputRoot = InputRoot;
   END;
END MODULE;


My problem is I do not have the behaviour I expect according to the documentation.
I test the flow once with a utf-8 message via http and at the end I have four MQ messages. In the order of the messages I have the CCSIDs 1208, 850, 437 and 850.
Here I would have expected 1208, 850, 1208, 850 because Properties should take precedence over MQMD.

The second test is quite similiar with a MQ message. The result is the same with CCSIDs 1208, 850, 437 and 850.
Here I would have expected 1208, 437, 437, 1208 because MQMD should take precedence over Properties.

I assume it is not an error of the broker. So my question is, where do I think wrongly?

Thank you,
John
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 17, 2013 4:30 am    Post subject: Re: Properties versus MQMD Reply with quote

Grand High Poobah

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

mq_dummy wrote:
(I really do not know, why I am not allowed to post links? Makes really sense.)


You're not allowed to post links because this is your first post. Many of the first posters here are bots who include links to places we don't want to go; preventing first posters including links has proved an effective defence.

mq_dummy wrote:
I assume it is not an error of the broker. So my question is, where do I think wrongly?


I don't think the MQMD you're setting in your code is the one broker is using.

But to answer your question "where do I think wrongly", the best answer is "what does the user trace say?". Seriously. Best advice for WMB doing something you don't expect is take a user trace & see WMB justify it's action. In your case, I would recommend the addition of a Trace node with a pattern of ${Root} between the compute node and the output. From this you should be able to diagnose what's going on. Post again (with links) if you can't.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Fri May 17, 2013 4:36 am    Post subject: Re: Properties versus MQMD Reply with quote

Shaman

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

mq_dummy wrote:
I really do not know, why I am not allowed to post links? Makes really sense.


You are allowed to post links using [U R L] tags.

mq_dummy wrote:

In the order of the messages I have the CCSIDs 1208, 850, 437 and 850.


This is the right order for the code that you have.

Message-1: You directly propagate the input message from HTTPInput node, which does not have a MQMD and hence the default 1208 is set.

Message-2: Your properties CCSID is 850 and hence thats what you get out.

Message-3: You dont have it in properties and hence from MQMD, 437.

Message-4: You have it in properties as 850.

Your statement is also proven here,

mq_dummy wrote:
because Properties should take precedence over MQMD


What is the problem here and why is this experiment?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri May 17, 2013 4:42 am    Post subject: Re: Properties versus MQMD Reply with quote

Grand High Poobah

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

kash3338 wrote:
You are allowed to post links using [U R L] tags.


Only on 2nd and subsequent posts.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Fri May 17, 2013 4:45 am    Post subject: Re: Properties versus MQMD Reply with quote

Shaman

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

Vitor wrote:
Only on 2nd and subsequent posts.


Thanks Vitor. I din't know this
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri May 17, 2013 4:45 am    Post subject: Reply with quote

Grand High Poobah

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

You also need to take into account whether you modified the value or not.
A value modified in MQMD (I believe) takes precedence over an unmodified value in Properties...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mq_dummy
PostPosted: Fri May 17, 2013 5:03 am    Post subject: Reply with quote

Newbie

Joined: 17 May 2013
Posts: 8

Thank you for the answers so far.

And I withdraw the question concerning the HTTPInput node.

But case 2 with the MQInput node I do not understand.
1. In this case MQMD should have precedence over Properties.
2. I copy the complete input message to OutputRoot.
3. I set the CCSID value in Properties and in MQMD.

The result is, the value is taken from the Properties folder and here I expected the value from MQMD.
Back to top
View user's profile Send private message
kash3338
PostPosted: Fri May 17, 2013 5:04 am    Post subject: Reply with quote

Shaman

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

fjb_saper wrote:
You also need to take into account whether you modified the value or not.
A value modified in MQMD (I believe) takes precedence over an unmodified value in Properties...


The document says this,

Quote:
When the message flow is sourced from an input node that is not the MQInput node (such as the HTTPInput node or a user-defined input node), no MQMD is parsed. In this scenario, the Properties folder is not sourced from an input MQMD; it is created and populated with transport values that come from other transport specific headers. When you create an MQMD folder in a message flow that was not sourced from the WebSphere MQ transport, the MQMD header does not take precedence over the Properties folder because the WebSphere MQ transport did not populate the Properties folder. Therefore, in this case, the Properties folder overwrites any values in MQMD.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri May 17, 2013 5:25 am    Post subject: Reply with quote

Grand High Poobah

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

kash3338 wrote:
fjb_saper wrote:
You also need to take into account whether you modified the value or not.
A value modified in MQMD (I believe) takes precedence over an unmodified value in Properties...


The document says this,

Quote:
When the message flow is sourced from an input node that is not the MQInput node (such as the HTTPInput node or a user-defined input node), no MQMD is parsed. In this scenario, the Properties folder is not sourced from an input MQMD; it is created and populated with transport values that come from other transport specific headers. When you create an MQMD folder in a message flow that was not sourced from the WebSphere MQ transport, the MQMD header does not take precedence over the Properties folder because the WebSphere MQ transport did not populate the Properties folder. Therefore, in this case, the Properties folder overwrites any values in MQMD.


Well I stand ammended. So the preference to the modified MQMD only works when you had an MQInput node....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mq_dummy
PostPosted: Tue May 21, 2013 12:38 am    Post subject: Reply with quote

Newbie

Joined: 17 May 2013
Posts: 8

Please, can you once more comment on this. I would really appreciate an answer to this topic.

mq_dummy wrote:
Thank you for the answers so far.

And I withdraw the question concerning the HTTPInput node.

But case 2 with the MQInput node I do not understand.
1. In this case MQMD should have precedence over Properties.
2. I copy the complete input message to OutputRoot.
3. I set the CCSID value in Properties and in MQMD.

The result is, the value is taken from the Properties folder and here I expected the value from MQMD.


Is this behaviour expected according to the description in the documentation?
Thank you!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 21, 2013 4:21 am    Post subject: Reply with quote

Grand High Poobah

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

mq_dummy wrote:
Please, can you once more comment on this. I would really appreciate an answer to this topic.

mq_dummy wrote:
Thank you for the answers so far.

And I withdraw the question concerning the HTTPInput node.

But case 2 with the MQInput node I do not understand.
1. In this case MQMD should have precedence over Properties.
2. I copy the complete input message to OutputRoot.
3. I set the CCSID value in Properties and in MQMD.

The result is, the value is taken from the Properties folder and here I expected the value from MQMD.


Is this behaviour expected according to the description in the documentation?
Thank you!

Yes it is. You modified both MQMD and Properties for the CCSID
Try only modifying one of them...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mq_dummy
PostPosted: Tue May 21, 2013 11:58 am    Post subject: Reply with quote

Newbie

Joined: 17 May 2013
Posts: 8

But this is the point. In this case I modified both on purpose!
And as I try to state, I am not sure if the flow behaves like it is described in the documentation. I am more than glad, if somebody can explain me, why my impression is false.
Of course I just can say, I try to avoid the situation, but I really want to understand!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 21, 2013 12:14 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

This behavior also changes over fixpack levels of v7. I'd suggest not experimenting with anything other than the most recent fixpack of v7, unless you're forced to use some specific fixpack of v7 for your final deployed solution.

If you are not using the most recent fixpack of v7, you should expect that your flow may act in ways that the documentation does not describe, because the infocenter was updated to match the most recent fixpack....
Back to top
View user's profile Send private message
mq_dummy
PostPosted: Mon May 27, 2013 1:34 am    Post subject: Reply with quote

Newbie

Joined: 17 May 2013
Posts: 8

Thanks for the idea!

I work with 7.0.0.3 and 7.0.0.5. In both cases the description in the documentation and the behaviour of the broker is like I stated. So this is not the solution.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue May 28, 2013 12:17 am    Post subject: Reply with quote

Shaman

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

Can you please do the following once?

1. Just have MQInput node as the source node and remove the HTTPInput node in your message flow.
2. Have PROPAGATE with DELETE NONE
3. Have a trace node just before the MQOutput node and capture all the headers in the trace file.
4. Share the trace with us here using the [c o d e] tags (Just the headers part of the trace).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Properties versus MQMD
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.