Author |
Message
|
Laurens |
Posted: Mon Apr 04, 2011 6:42 am Post subject: Broker V7: How to see the lenght of the MQ Message |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Apr 04, 2011 6:44 am Post subject: |
|
|
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 |
|
 |
zpat |
Posted: Mon Apr 04, 2011 7:05 am Post subject: |
|
|
 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 |
|
 |
rekarm01 |
Posted: Mon Apr 04, 2011 11:04 am Post subject: Re: Broker V7: How to see the length of the MQ Message |
|
|
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 |
|
 |
Laurens |
Posted: Mon Apr 04, 2011 11:24 am Post subject: In ESQL finding the lenght of InputData |
|
|
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 |
|
 |
smdavies99 |
Posted: Mon Apr 04, 2011 11:48 am Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Tue Apr 05, 2011 3:00 am Post subject: |
|
|
 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 |
|
 |
Laurens |
Posted: Tue Apr 05, 2011 6:04 am Post subject: |
|
|
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 |
|
 |
|