Author |
Message
|
yoyo |
Posted: Sun Feb 19, 2017 11:46 pm Post subject: Message properties length wrongly included in message length |
|
|
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 |
|
 |
smdavies99 |
Posted: Mon Feb 20, 2017 1:24 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 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 |
|
 |
yoyo |
Posted: Mon Feb 20, 2017 1:29 am Post subject: |
|
|
Novice
Joined: 19 Feb 2017 Posts: 10
|
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Feb 20, 2017 5:26 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 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 |
|
 |
yoyo |
Posted: Mon Feb 20, 2017 10:35 am Post subject: |
|
|
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 |
|
 |
smdavies99 |
Posted: Mon Feb 20, 2017 10:57 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 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 |
|
 |
gbaddeley |
Posted: Mon Feb 20, 2017 3:23 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 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 |
|
 |
yoyo |
Posted: Tue Feb 21, 2017 2:16 am Post subject: |
|
|
Novice
Joined: 19 Feb 2017 Posts: 10
|
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Feb 21, 2017 4:06 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
yoyo |
Posted: Tue Feb 21, 2017 4:26 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue Feb 21, 2017 5:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, 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 |
|
 |
yoyo |
Posted: Tue Feb 21, 2017 6:09 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Tue Feb 21, 2017 7:25 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue Feb 21, 2017 2:18 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
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 |
|
 |
RogerLacroix |
Posted: Tue Feb 21, 2017 3:56 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 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 |
|
 |
|