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 Index » IBM MQ API Support » problem with getting automatically segmented messages

Post new topic  Reply to topic
 problem with getting automatically segmented messages « View previous topic :: View next topic » 
Author Message
Tibor
PostPosted: Mon Mar 09, 2009 7:13 am    Post subject: problem with getting automatically segmented messages Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Mon Mar 09, 2009 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Tibor
PostPosted: Mon Mar 09, 2009 7:57 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Mon Mar 09, 2009 8:04 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 09, 2009 1:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vol
PostPosted: Mon Mar 09, 2009 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
vol
PostPosted: Mon Mar 09, 2009 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tibor
PostPosted: Tue Mar 10, 2009 7:40 am    Post subject: Reply with quote

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
View user's profile Send private message
vol
PostPosted: Tue Mar 10, 2009 1:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tibor
PostPosted: Wed Mar 11, 2009 12:36 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 11, 2009 3:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tibor
PostPosted: Wed Mar 11, 2009 3:54 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 11, 2009 7:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tibor
PostPosted: Thu Mar 12, 2009 12:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » problem with getting automatically segmented messages
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.