IBM Support

IT11843: MQGETMESSAGEOPTION.SEGEMENTSTATUS SET TO BLANK ON MESSAGES OVER 4KB IN LENGTH.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • After migrating an application from using the WebSphere MQ v6
    classes for Java application to the IBM MQ v8 classes for Java,
    the application fails when processing inbound segmented messages
    greater than 4K.
    
    The application expected a complete message to be comprised of
    three message segments.  As such, the SegmentStatus for the
    three segmented messages was expected to be S,S,L to indicate
    two message segments and the last message segment.  However, on
    receipt of messages larger than 4Kb in size, the SegementStatus
    of the message would either be set to blank,S,L or b,b,L.  This
    prevented the application from consuming all the message
    segments.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the WebSphere MQ classes for Java,
    who are receiving messages from a WebSphere MQ queue manager
    that are larger than the initial message buffer size (which
    defaults to 4KB), specify the MQGMO_CONVERT option and check the
    message segmentation status or the group status fields of the
    MQGetMessageOptions object returned from the MQGET API call.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using the WebSphere MQ classes for Java, the application
    can choose to check the message segmentation status flag which
    is returned within the MQGetMessageOptions object.
    
    As an example, consider the following code snippet:
    
    -----------------------------------------------------------
    MQGetMessageOptions gmo = new MQGetMessageOptions();
    MQMessage returnedMsg = new MQMessage();
    
    // Set the MQGET options
    gmo.options = MQC.MQGMO_SYNCPOINT |
                  MQC.MQGMO_CONVERT |
                  MQC.MQGMO_LOGICAL_ORDER |
                  MQC.MQGMO_ALL_MSGS_AVAILABLE |
                  MQC.MQGMO_ALL_SEGMENTS_AVAILABLE;
    
    // Issue the MQGET on "com.ibm.mq.MQQueue" object "queue"
    queue.get(responseMsg, gmo);
    
    // Check the Segmentation Status of the updated GMO
    char msgSegmentationStatus = gmo.segmentStatus;
     -----------------------------------------------------------
    
    This message segmentation flag is set to one of the following
    character values:
    
    MQC.MQSS_NOT_A_SEGMENT, ' ', to indicate that the message
    returned is not a segment of a logical message.
    
    MQC.MQSS_SEGMENT, 'S', to indicate that the message returned
    is a segment of a logical message.
    
    MQC.MQSS_LAST_SEGMENT, 'L', to indicate that the segment is
    the last segment of a logical message.
    
    If the message being consumed was bigger than the buffer size
    initially set by the WebSphere MQ classes for Java (which
    defaults to 4KB), the message segmentation status,
    com.ibm.mq.MQGetMessageOptions.segmentStatus, in the returned
    GMO may not have reflected the true segmentation status of the
    returned message.  The value of the gmo.segmentStatus call would
    be MQC.MQSS_NOT_A_SEGMENT (i.e., ' ').
    
    The actual segmentation status was incorrectly set on the GMO
    group status field.  For a segmented message that is not the
    last segment of a logical message, this meant that the following
    check:
    
      gmo.groupStatus
    
    would return a value MQC.MQSS_SEGMENT (i.e., 'S').
    

Problem conclusion

  • The WebSphere MQ classes for Java have been updated so that the
    correct value of the field:
    
      com.ibm.mq.MQGetMessageOptions.segmentStatus
    
    has been set on the GMO, when the message has been consumed
    successfully, without an error code being returned from the
    queue manager.
    
    For more information about this APAR, please see the following
    video : https://www.youtube.com/watch?v=MEppQnVIXvM
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.5       7.5.0.7
    v8.0       8.0.0.5
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT11843

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-10-19

  • Closed date

    2015-11-30

  • Last modified date

    2017-03-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WMQ BASE MULTIP

  • Fixed component ID

    5724H7251

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.0.0","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
24 March 2017