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 » Broker V7: How to see the lenght of the MQ Message

Post new topic  Reply to topic
 Broker V7: How to see the lenght of the MQ Message « View previous topic :: View next topic » 
Author Message
Laurens
PostPosted: Mon Apr 04, 2011 6:42 am    Post subject: Broker V7: How to see the lenght of the MQ Message Reply with quote

Apprentice

Joined: 01 Oct 2009
Posts: 35

dear all ,


Message Broker V7

Trying desperately to find oud where I can see the message lenght of an MQ Message. Sounds easy enough but in the Broker I seem to be unable to get it.
It is not the OriginalLength in the MQMD , that one is always -1

Short from converting it into a BLOB and counting the bytes I'm at a loss.

Any ideas ?

All input welcome !

Laurens
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Apr 04, 2011 6:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The length of the message should accurately reflect the actual contents of the message.

Why do you need to specify a message length that is not the actual length of the serialized message tree?

What problem are you trying to solve, that this seems the right direction to take?
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Apr 04, 2011 7:05 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Do you need to know in the flow, or just find out (use MO71 or explorer)?

What is the original CCSID? Is there a byte order mark at the front?
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Apr 04, 2011 11:04 am    Post subject: Re: Broker V7: How to see the length of the MQ Message Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Laurens wrote:
Trying desperately to find out where I can see the message length of an MQ Message.

Which length? The byte length? The character length?

The MQGET function returns byte length in the DataLength parameter, but that's not directly accessible to the message flow. So, converting to BLOB (or CHAR), and taking the LENGTH of the resulting string seems to be the most direct approach.
Back to top
View user's profile Send private message
Laurens
PostPosted: Mon Apr 04, 2011 11:24 am    Post subject: In ESQL finding the lenght of InputData Reply with quote

Apprentice

Joined: 01 Oct 2009
Posts: 35

Thank you for the repliies .

For the business I need to log the message size ( size in bytes) of each message passing my message flow. (business is billed based on datasize)

So indeed the DataLenght() you may get when using the MQ API

Unfortunately in ESQL apart from converting to blob and taking the lenght I don't see anything (yet)

I would like to find a solution that has little till no impact on performance.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Apr 04, 2011 11:48 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.

How about setting the MQinput Node to BLOB so that the message is not parsed on input
Then in a compute node you can fing the lenght and then setup the params for the message to be parsed.
_________________
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
kimbert
PostPosted: Tue Apr 05, 2011 3:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
How about setting the MQinput Node to BLOB so that the message is not parsed on input
Then in a compute node you can fing the length

I agree - this is the most efficient solution.
Quote:
and then setup the params for the message to be parsed.

...or use a ResetContentDescriptor node - the params for parsing are likely to be the same every time.
Back to top
View user's profile Send private message
Laurens
PostPosted: Tue Apr 05, 2011 6:04 am    Post subject: Reply with quote

Apprentice

Joined: 01 Oct 2009
Posts: 35

Ok , I'll try that and check with the broker stats how big a performance it has.

Thank you for the help !

Regards
Laurens
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 » Broker V7: How to see the lenght of the MQ Message
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.