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 IndexGeneral IBM MQ SupportMessage properties length wrongly included in message length

Post new topicReply to topic Goto page Previous  1, 2
Message properties length wrongly included in message length View previous topic :: View next topic
Author Message
yoyo
PostPosted: Tue Feb 21, 2017 9:36 pm Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi RogerLacroix,

Thanks for the link. But then where is this feature restriction documented officially?

Hi bruce2359,
I can see MQPUT takes buffer, bufferLength
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.dev.doc/q101880_.htm

But I'm using high level JMS implementation around IBM MQ's base library to create messages and to set properties.
I couldn't find the API exposing to take in my specified buffer length.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 22, 2017 6:09 am Post subject: Reply with quote

Grand Poobah

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

yoyo wrote:
Hi RogerLacroix,

Thanks for the link. But then where is this feature restriction documented officially?

Hi bruce2359,
I can see MQPUT takes buffer, bufferLength
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.dev.doc/q101880_.htm

But I'm using high level JMS implementation around IBM MQ's base library to create messages and to set properties.
I couldn't find the API exposing to take in my specified buffer length.

If you are using JMS you should not be dealing with buffer lengths at all. Just make sure your max message length on the queue is greater than MQMD + RFH2 + payload length...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
yoyo
PostPosted: Wed Feb 22, 2017 9:46 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi fjb_saper,

That does not solve the aim.
My aim was to verify if message property's length is counted as part of message length or not.
The docs state otherwise, and a simple test gives me a different result.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 22, 2017 2:15 pm Post subject: Reply with quote

Grand Poobah

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

yoyo wrote:
Hi fjb_saper,

That does not solve the aim.
My aim was to verify if message property's length is counted as part of message length or not.
The docs state otherwise, and a simple test gives me a different result.


The docs are correct. It is not counted as part of the message length per se. However when persisting the message you still need to account for it.

So when you use gmo/pmo option MESSAGE_PROPERTIES_IN_HANDLE or equivalent, the message length is really the payload length but you also have a properties length to account for....

Like I said it may be splitting hairs but the reality is that the total length needs to be accounted for when persisting.... (MQMD + properties (RFH2?) + payload )
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Wed Feb 22, 2017 3:45 pm Post subject: Reply with quote

Padawan

Joined: 25 Mar 2003
Posts: 1598
Location: Melbourne, Australia

At times its frustrating that IBM included RFH / properties properties in the Message Data. A new part of a MQ message should have been invented. 1) MQMD, 2) RFH properties & possibly other common MQ structures, 3) Message Data = app data payload usually in string format.
Too late by a couple of decades....
_________________
Glenn
Back to top
View user's profile Send private message
yoyo
PostPosted: Fri Feb 24, 2017 10:35 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi gbaddeley,

Yup. That should've been the case in order to not count them in message's length.

Hi fjb_saper,

Yes it is splitting hairs! But I still don't see how the docs clearly convey that. I still feel they are incorrect.


So to conclude I think we can agree that yes they are accounted.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 24, 2017 2:10 pm Post subject: Reply with quote

Grand Poobah

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

yoyo wrote:
Hi gbaddeley,

Yup. That should've been the case in order to not count them in message's length.

Hi fjb_saper,

Yes it is splitting hairs! But I still don't see how the docs clearly convey that. I still feel they are incorrect.


So to conclude I think we can agree that yes they are accounted.

The docs convey the API. In the API the properties are not part of the message length. When serialized and stored on disk you have to count them
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Fri Feb 24, 2017 7:15 pm Post subject: Re: Message properties wrongly included in message length Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1220

yoyo wrote:
Yup this is a bug.
The issue was raised back in 2009
Take a look here-
http://www-01.ibm.com/support/docview.wss?uid=swg1PK88817

I'm not sure if it is fixed or not.

What MQ version and platform is the application using? Whatever the issue may be, unless it's using MQ v7.0.0 on z/OS, it's probably not related to this APAR.

yoyo wrote:
But according to IBM docs here,
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q022930_.htm

The property length does not count.

That's not quite what the doc says:

Quote:
It is possible for an application to successfully put a message with a buffer that is larger than the value of MaxMsgLength, if the buffer includes properties. ...
The MQRFH2 header fields add to the properties length only if ... every folder in the header contains properties.
If ... any folder does not contain properties, the MQRFH2 header fields count toward the message length instead.

Does every folder in the MQRFH2 header contain properties, or are there folder(s) that don't contain properties?

yoyo wrote:
But a simple hello world example gives a different outcome inconsistent with what the doc said.

If so, then it's time for a PMR, to fix one or the other.
Back to top
View user's profile Send private message
yoyo
PostPosted: Tue Feb 28, 2017 6:50 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi rekarm01,

MQ version is 7.1
And platform is unix
Yes you are right, the APAR contains a different platform and version, but it is exactly the same issue.

Only the usr folder contains properties I believe.
How do I view these folders?
Back to top
View user's profile Send private message
rekarm01
PostPosted: Tue Feb 28, 2017 4:16 pm Post subject: Re: Message properties wrongly included in message length Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1220

yoyo wrote:
Yes you are right, the APAR contains a different platform and version, but it is exactly the same issue.

The Unix platform does not have a CSQMPOM module with a CSQMDMCM macro to calculate the message length, for which an available zSeries fix can be applied. It is not the same issue.

yoyo wrote:
Only the usr folder contains properties I believe.
How do I view these folders?

There are plenty of tools available for browsing messages on a queue, such as IBM's sample program amqsbcg0, IH03 (rfhutil) supportpac, and various third party applications to choose from.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum IndexGeneral IBM MQ SupportMessage properties length wrongly included in 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.