IBM Support

IT31623: MQ classes for JMS incorrectly treat messages with headers that have a CCSID field set to -2 as poison messages.

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • A message that contains an MQHRF Version 1 header is put to a
    queue. The header is the last header before the message payload,
    and has the "CodedCharSetID" (CCSID) field set to the value -2,
    as shown below:
    
    ------------------------------------------------------------
    MQMD:
        - Version 2
        - PutApplType: 26 (MQAT_BROKER)
        - CCSID: 1208
        - Encoding: 546
        - Format: MQHRF
    MQHRF
        - Version: 1
        - CCSID: -2
        - Encoding: 546
        - Format: MQSTR
    Message Payload
    ------------------------------------------------------------
    
    An IBM MQ classes for JMS application:
    
    - Creates a JMSContext to establish a connection to the queue
    manager where the queue is located.
    - Creates a JMSConsumer for the queue hosting the message.
    - Calls the method JMSConsumer.receiveBody(Class<T> c, long
    timeout) to get the message.
    
    However, rather than being returned to the application, the IBM
    MQ classes for JMS move the message to the queue manager's dead
    letter queue.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the IBM MQ classes for JMS who have
    applications that consume messages from a JMS destination,
    where:
    
    - The messages contain one or more headers.
    - And the last header before the message payload has the
    "CodedCharSetID" (CCSID) field set to MQCCSI_INHERIT (-2)
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    IBM MQ messages have the following format:
    
    - An MQ Message Descriptor (MQMD)
    - Zero or more message headers.
    - The message payload.
    
    The MQMD, and the message headers, contain a field called
    "CodedCharSetID" (CCSID). This field specifies the character set
    identifier of the character data in the next part of the message
    (which is either a header or the message payload). If the CCSID
    field within a message header is set to MQCCSI_INHERIT (-2),
    then it indicates that the character data in the next part of
    the message (either another header or the message payload) is
    encoded using the same CCSID as this header.
    
    For example, in the following message, the character data in the
    message payload is encoded using CCSID 1208:
    
    ------------------------------------------------------------
    MQMD:
        - Version 2
        - PutApplType: 26 (MQAT_BROKER)
        - CCSID: 1208
        - Encoding: 546
        - Format: MQHRF
    MQHRF
        - Version: 1
        - CCSID: -2
        - Encoding: 546
        - Format: MQSTR
    Message Payload
    ------------------------------------------------------------
    
    
    Now, when the IBM MQ classes for JMS received a message from a
    destination, they would process all of the headers on that
    message first before processing the message body. If they
    detected that the last header on a message had the CCSID field
    set to MQCCSI_INHERIT, then they would incorrectly assume that
    the character data within the message body was encoded using
    CCSID -2. As a result, the IBM MQ classes for JMS would try to
    use CCSID -2 to decode the character data in the message body -
    this would fail as -2 did not map to a character set.
    
    Because of this, the IBM MQ classes for JMS would determine that
    the message was a "poison message", and either:
    
    - Move it to a backout requeue queue (if one was specified)
    - Put it to the queue manager's dead letter queue.
    - Or discard it.
    
    depending on how the queue manager had been configured, the
    design of the application and report options of the message.
    

Problem conclusion

  • The IBM MQ classes for JMS have been updated to correctly handle
    messages where the last header before the message payload has
    the "CodedCharSetID" (CCSID) field set to the value
    MQCCSI_INHERIT (-2). This ensures that the CCSID of the header
    before the last one is used to decode the character data in the
    message payload, which allows the message to be returned to the
    application.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 CD    9.1.5
    v9.1 LTS   9.1.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

    IT31623

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-01-22

  • Closed date

    2020-02-05

  • Last modified date

    2020-02-05

  • 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

    IBM MQ BASE MP

  • Fixed component ID

    5724H7271

Applicable component levels

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

Document Information

Modified date:
05 February 2020