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 1, 2  Next
Message properties length wrongly included in message length View previous topic :: View next topic
Author Message
yoyo
PostPosted: Sun Feb 19, 2017 11:46 pm Post subject: Message properties length wrongly included in message length Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

When putting a message to a queue, the length of the message is
checked to ensure it is less than the MAXMSGL attribute on the
queue. If the message contains message properties (for example,
messages put using JMS) the length of these properties is
incorrectly included in the message length when making this
check. This can lead to the message length appearing to MQ to be
greater than MAXMSGL, causing MQRC_MSG_TOO_BIG_FOR_Q to be
invalidly returned.


My PROPCTL is NONE.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Feb 20, 2017 1:24 am Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6061
Location: Somewhere over the Rainbow this side of Never-never land.

So what's your problem exactly?

is it 'should this be the case?'
or
'is this a bug?'

I think it is the former [1] but the sure fire way to get the correct answer is to raise a PMR with IBM

[1] That's just a worthless guess you understand and not worth the paper it is written on.
_________________
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
yoyo
PostPosted: Mon Feb 20, 2017 1:29 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

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.

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.

But a simple hello world example gives a different outcome inconsistent with what the doc said.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Feb 20, 2017 5:26 am Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6061
Location: Somewhere over the Rainbow this side of Never-never land.

Then it is time for a PMR.
_________________
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
yoyo
PostPosted: Mon Feb 20, 2017 10:35 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Could you try a small example, to confirm that you face it too?
If we can confirm, then I'll raise a PMR.

Try Setting MaxMsgLength too small.
And send a small message under the limit, but with a large message property

msg.setStringProperty("someKey", "someVal")
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Feb 20, 2017 10:57 am Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6061
Location: Somewhere over the Rainbow this side of Never-never land.

yoyo wrote:
Could you try a small example, to confirm that you face it too?
If we can confirm, then I'll raise a PMR.

Try Setting MaxMsgLength too small.
And send a small message under the limit, but with a large message property

msg.setStringProperty("someKey", "someVal")


Someone else may be prepared to do it. Java to me is a 4-letter word.
_________________
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
gbaddeley
PostPosted: Mon Feb 20, 2017 3:23 pm Post subject: Reply with quote

Padawan

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

The RFH / message properties are included in the Message Data, before the payload and any other MQ structures, so it makes sense that these are included in the overall Message Length, and therefore subject to the Maximum Message Length check.
_________________
Glenn
Back to top
View user's profile Send private message
yoyo
PostPosted: Tue Feb 21, 2017 2:16 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi gbaddeley,

But according to IBM docs

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q022930_.htm

They clearly state - message properties do not count toward the length of the message

Please take a look
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 21, 2017 4:06 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 7748
Location: US: west coast, almost. Otherwise, enroute.

Did you read carefully the paragraph in the doc URL you cite "Do not have your applications query the value of MaxMsgLength and ..."?

Make your app buffer quite a bigger than the biggest message. Same with queue attribute maxmsglength.
_________________
Random numbers are far too important to be left to chance.
Back to top
View user's profile Send private message
yoyo
PostPosted: Tue Feb 21, 2017 4:26 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi bruce2359,

The buffer you talk about is for a MQGET call.
I face the error on MQPUT call.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 21, 2017 5:47 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24257
Location: Ohio, USA

What's the compatibility setting on your queue manager? Is it possible that the message properties are being converted into an RFH2 without your knowledge?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yoyo
PostPosted: Tue Feb 21, 2017 6:09 am Post subject: Reply with quote

Novice

Joined: 19 Feb 2017
Posts: 10

Hi Vitor,

The compatibility setting(PROPCTL or property control I think what you mean) is set to NONE.

I tried changing it to all the possible ones - ForceRFH2, V6COMPAT, COMPAT
Still faced the same issue.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 21, 2017 7:25 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 7748
Location: US: west coast, almost. Otherwise, enroute.

yoyo wrote:
Hi bruce2359,

The buffer you talk about is for a MQGET call.
I face the error on MQPUT call.

Same concept applies to both MQGETs and MQPUTs - make your buffer bigger AND don't inquire on max msg length.
_________________
Random numbers are far too important to be left to chance.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Feb 21, 2017 2:18 pm Post subject: Reply with quote

Padawan

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

yoyo wrote:
Hi gbaddeley,
But according to IBM docs
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q022930_.htm
They clearly state - message properties do not count toward the length of the message
Please take a look

OK, so therefore if a message includes properties, then the length of a message on a queue can exceed the queue's max msg length attribute.

When allocating a buffer size to get or put messages, it is not recommended to inquire on the queue's max message length and use that. ...Unless your site has rigidly set and enforced a particular max message length for each queue....

We routinely define queues to use the default 4MB or just set the max to 100MB, regardless of how small the expected message length. The thought is that its better to let unexpectedly long messages flow through, rather than have app failures or msgs appearing on dead letter queues.
_________________
Glenn
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Feb 21, 2017 3:56 pm Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 2983
Location: London, ON Canada

Ever since IBM introduced Message Properties in MQ, there are many inconsistency in how it was implemented.

At MQTC v2.0.1.5, Greg Brown did a session called Enabling Auto-Segmentation of Messages Having Defined Properties. His session was primarily on how the message properties were being included in the message length value and the issues it was causing.

IBM told Greg:
Quote:
L3 announces that no code fix will be done; will document the bug as a feature "restriction".

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 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.