Author |
Message
|
pawel_janowski |
Posted: Fri Mar 20, 2009 5:24 am Post subject: Actual message length |
|
|
Apprentice
Joined: 13 Dec 2006 Posts: 38
|
Hi everyone!
What is the easiest (and cheapest) way to obtain the actual size of the message (the whole size or the size of MRM)?
Regards.
Pawel Janowski _________________ Pawel Janowski |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 20, 2009 5:38 am Post subject: Re: Actual message length |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pawel_janowski wrote: |
What is the easiest (and cheapest) way to obtain the actual size of the message (the whole size or the size of MRM)?
|
Why? Of what use or value is this information? What do you mean by "the whole size" against "the size of the MRM" which is the entire message read in? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pawel_janowski |
Posted: Fri Mar 20, 2009 5:42 am Post subject: Re: Actual message length |
|
|
Apprentice
Joined: 13 Dec 2006 Posts: 38
|
Vitor wrote: |
Why? Of what use or value is this information? What do you mean by "the whole size" against "the size of the MRM" which is the entire message read in? |
Well, inside the message flow I'd like to find out what is the size of application data (MRM).
Regards, _________________ Pawel Janowski |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 20, 2009 5:48 am Post subject: Re: Actual message length |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pawel_janowski wrote: |
Vitor wrote: |
Why? Of what use or value is this information? What do you mean by "the whole size" against "the size of the MRM" which is the entire message read in? |
Well, inside the message flow I'd like to find out what is the size of application data (MRM).
|
That's not an answer; that's saying "I want to know the size of the application data because I want to know the size of the application data".
My point is that by knowing what use you plan to put this knowledge to, we may be able to suggest a better way of achiving your requirement. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pawel_janowski |
Posted: Fri Mar 20, 2009 5:58 am Post subject: Re: Actual message length |
|
|
Apprentice
Joined: 13 Dec 2006 Posts: 38
|
Vitor wrote: |
pawel_janowski wrote: |
Vitor wrote: |
Why? Of what use or value is this information? What do you mean by "the whole size" against "the size of the MRM" which is the entire message read in? |
Well, inside the message flow I'd like to find out what is the size of application data (MRM).
|
That's not an answer; that's saying "I want to know the size of the application data because I want to know the size of the application data".
My point is that by knowing what use you plan to put this knowledge to, we may be able to suggest a better way of achiving your requirement. |
OK. I've got your point. I'd like to do some kind of accounting and summarize sizes of messages -by type of the message (I mean by InputRoot.MQRFH2.mcd.Type). But anyway - the aside question is how to get the actual size of the whole WMQ message or MRM from inside of flow (of course I know that after MQGET I've got the actual size of the message).
Regards, _________________ Pawel Janowski |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 20, 2009 6:02 am Post subject: Re: Actual message length |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pawel_janowski wrote: |
[But anyway - the aside question is how to get the actual size of the whole WMQ message or MRM from inside of flow (of course I know that after MQGET I've got the actual size of the message).
|
It's in many ways a shame the MQInput node doesn't expose that data anywhere I'm aware of. I await someone explaining how to obtain it.
I'd say the easiest way is to flatten the message body into a string and measure it. Unconvinced as to how cheap that it.
Other and undoubtably better/more ingenious ways are probably available. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pawel_janowski |
Posted: Fri Mar 20, 2009 6:32 am Post subject: |
|
|
Apprentice
Joined: 13 Dec 2006 Posts: 38
|
Thanks!
Regards, _________________ Pawel Janowski |
|
Back to top |
|
 |
kimbert |
Posted: Fri Mar 20, 2009 6:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I'd like to do some kind of accounting and summarize sizes of messages |
Any reason why you are not using the built-in facilities? http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac18920_.htm
You can get the size of the message body using ASBITSTREAM.
If you want the size of the entire message, you will need to iterate over the headers and body calling ASBITSTREAM on each one. But I would advise you to look carefully at the stats&accounting facilities first. |
|
Back to top |
|
 |
|