Author |
Message
|
Tibor |
Posted: Mon Mar 09, 2009 7:13 am Post subject: problem with getting automatically segmented messages |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Some days ago there was a hang in a message queue reading by the message broker. After investigation I saw that the problem was caused by a big message with these properties:
- MQMD.Format: MQHRF2
- MQMD.CCSID: 1250
- MQRFH2.CCSID: 819
- MQMD.MsgFlags: segmentation allowed
In the broker input queue there were the segments:
1. Format: MQHRF2, CCSID: 1250
2. Format: <empty>, CCSID:819
3. Format: <empty>, CCSID:819
4. Format: <empty>, CCSID:819 (last)
This message causes an error MQRC_INCONSISTENT_CCSIDS (2243).
For workaround I recommended using same CCSID in the header, but it is an MQ internal error, isn't it?
Thanks in advance,
Tibor |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Mar 09, 2009 7:25 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
No, it's correct as far as I can tell.
The CCSID on the MQMD tells you what CCSID the RFH2 header is in. The CCSID on the RFH2 header tells you what CCSID the message body is in.
So if only the first segment has the RFH2 in it, only the first segment needs an MQMD CCSID of 1250.
On the other hand, is 1250 a valid CCSID for an RFH2 Header? |
|
Back to top |
|
 |
Tibor |
Posted: Mon Mar 09, 2009 7:57 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Quote: |
So if only the first segment has the RFH2 in it, only the first segment needs an MQMD CCSID of 1250. |
It would be logical, but the MQGET with MQGMO_COMPLETE_MSG can't read it from the queue.
Quote: |
On the other hand, is 1250 a valid CCSID for an RFH2 Header? |
Yes it is, because it is set for body and not for NameValueData. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Mar 09, 2009 8:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There may be more information buried in the documentation on this, I have some vague memories of discussions on segmentation and RFH2 stuff like this.
I'd still double-check that 1250 is valid for a CCSID for an RFH2 header... |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 09, 2009 1:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
JMS does not do segmentation. So can somebody please explain how the RFH header came to be on the segmented message? You might have better luck using grouping.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vol |
Posted: Mon Mar 09, 2009 11:06 pm Post subject: |
|
|
Acolyte
Joined: 01 Feb 2009 Posts: 69
|
There are 2 APARs included in 6.0.2.2 which may be relevant in this case, IC51496 & IC51497. |
|
Back to top |
|
 |
vol |
Posted: Mon Mar 09, 2009 11:21 pm Post subject: |
|
|
Acolyte
Joined: 01 Feb 2009 Posts: 69
|
Sorry, I was wrong, the APARs do not apply. The APARs deal with ensuring that the msg segments have the correct CCSID and Encoding, and that MQGMO_COMPLETE_MSG returns the right reason code.
When the CCSID (Encoding) is not the same on all segments the msg cannot be returned as a complete msg, but only as individual segments. This is documented in the APR - see MQGMO, Options, MQGMO_COMPLETE_MSG: |
|
Back to top |
|
 |
Tibor |
Posted: Tue Mar 10, 2009 7:40 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Quote: |
When the CCSID (Encoding) is not the same on all segments the msg cannot be returned as a complete msg, but only as individual segments. This is documented in the APR - see MQGMO, Options, MQGMO_COMPLETE_MSG: |
It would be nice, but the segmentation processed by the queue manager not an application. |
|
Back to top |
|
 |
vol |
Posted: Tue Mar 10, 2009 1:05 pm Post subject: |
|
|
Acolyte
Joined: 01 Feb 2009 Posts: 69
|
From the APR
Quote: |
A logical message consisting of segments in which the CodedCharSetId and Encoding fields differ cannot be reassembled by the queue manager into a single logical message. Instead, the queue manager reassembles and returns the first few consecutive segments at the start of the logical message that have the same character-set identifiers and encodings, and the MQGET call completes with completion code MQCC_WARNING and reason code MQRC_INCONSISTENT_CCSIDS or MQRC_INCONSISTENT_ENCODINGS, as appropriate. |
In other words, the qmgr may automatically segment a msg and then be unable to reassemble it when requested to do so, and this is documented behaviour (so there!). |
|
Back to top |
|
 |
Tibor |
Posted: Wed Mar 11, 2009 12:36 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
vol wrote: |
In other words, the qmgr may automatically segment a msg and then be unable to reassemble it when requested to do so, and this is documented behaviour (so there!). |
In this case the only workaround is the changing of the sending application, because the message broker doesn't like this behavior. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 11, 2009 3:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Tibor wrote: |
vol wrote: |
In other words, the qmgr may automatically segment a msg and then be unable to reassemble it when requested to do so, and this is documented behaviour (so there!). |
In this case the only workaround is the changing of the sending application, because the message broker doesn't like this behavior. |
Do you really need the RFH header on this message? How about stripping it before putting the message to the queue?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Tibor |
Posted: Wed Mar 11, 2009 3:54 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Quote: |
Do you really need the RFH header on this message? How about stripping it before putting the message to the queue? |
Not a good idea, because the using of RFH2 header is fundamental in the MQ based integration at this company. This header contents the meta informations which defines the routing rules on the broker. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 11, 2009 7:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As an alternate can the sender make sure (by setting the CCSID on the QCF ?) that message content and header will have the same CCSID? Mark the CCSID of the value pair can be different if still in the allowed values.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Tibor |
Posted: Thu Mar 12, 2009 12:49 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
fjb_saper wrote: |
As an alternate can the sender make sure (by setting the CCSID on the QCF ?) that message content and header will have the same CCSID? Mark the CCSID of the value pair can be different if still in the allowed values. |
It may work but it means some changes on the sender application side. The original question was how we can handle it on the receiver side (in our case this is the message broker). |
|
Back to top |
|
 |
|