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 » Actual message length

Post new topic  Reply to topic
 Actual message length « View previous topic :: View next topic » 
Author Message
pawel_janowski
PostPosted: Fri Mar 20, 2009 5:24 am    Post subject: Actual message length Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Mar 20, 2009 5:38 am    Post subject: Re: Actual message length Reply with quote

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
View user's profile Send private message
pawel_janowski
PostPosted: Fri Mar 20, 2009 5:42 am    Post subject: Re: Actual message length Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Mar 20, 2009 5:48 am    Post subject: Re: Actual message length Reply with quote

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
View user's profile Send private message
pawel_janowski
PostPosted: Fri Mar 20, 2009 5:58 am    Post subject: Re: Actual message length Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Mar 20, 2009 6:02 am    Post subject: Re: Actual message length Reply with quote

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
View user's profile Send private message
pawel_janowski
PostPosted: Fri Mar 20, 2009 6:32 am    Post subject: Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

Thanks!

Regards,
_________________
Pawel Janowski
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Mar 20, 2009 6:49 am    Post subject: Reply with quote

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
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 » Actual message length
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.