IBM Support

IT39543: IBM MQ Bridge to Salesforce fails with AMQSF040E if the HTTP response is larger than 1 MiB.

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

  • The following error message is seen in the IBM MQ Bridge to
    Salesforce log file when the IBM MQ Bridge to Salesforce is
    configured to consume platform events from Salesforce, and there
    are a number of events available for consumption when the Bridge
    starts.
    
    [AMQSF040E] Error: A unexpected Salesforce error has occurred.
    {failure={exception=java.lang.IllegalArgumentException:
    Buffering capacity exceeded, message={clientId=xxx,
    channel=/meta/connect, id=xxx, connectionType=long-polling},
    connectionType=long-polling}, channel=/meta/connect, id=xxx,
    successful=false}
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    Users of the IBM MQ Bridge to Salesforce who are consuming
    platform events from Salesforce.
    
    
    Platforms affected:
    Linux on x86-64
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    The IBM MQ Bridge to Salesforce utilises the third party
    technologies 'CometD' and 'Jetty', to interact with Salesforce.
    
    When consuming platform events from Salesforce (to transform
    into MQ message publications), CometD uses the HTTP interface
    provided by Salesforce to consume platform events.
    
    If there are a number of platform events available for
    consumption, for example where the IBM MQ Bridge to Salesforce
    has not been running and platform events have been accumulating,
    then when the IBM MQ Bridge to Salesforce is started a number of
    the platform events will be sent over the HTTP interface.
    
    By default CometD configures Jetty with a 1 MiB buffer for the
    HTTP data coming in from Salesforce. The amount of data which
    Salesforce sends in one go may exceed this size, which will
    result in the following error message being observed in the IBM
    MQ Bridge to Salesforce log file:
    
    2024-03-15 14:56:09.670 GMT [AMQSF040E] Error: A unexpected
    Salesforce error has occurred.
    {failure={exception=java.lang.IllegalArgumentException:
    Buffering capacity 1048576 exceeded, message={clientId=xxx,
    channel=/meta/connect, id=x, connectionType=long-polling},
    connectionType=long-polling}, channel=/meta/connect, id=x,
    successful=false}
    
    After this message has been reported the IBM MQ Bridge to
    Salesforce will typically attempt to re-establish the connection
    to Salesforce, which subsequently results in the same error
    message being reported again. The net result is that the
    platform events are not being consumed and published to the
    corresponding MQ Topic.
    

Problem conclusion

  • The IBM MQ Bridge to Salesforce has been updated in two ways:
    
    (1) The default Jetty buffer size has been increased to 4 MiB.
    
    (2) The Jetty buffer size is now user-configurable, through the
    use of the Java system property:
    
    
    com.ibm.mq.runmqsfb.jettyHttpClientTransportMaxMessageSizeBytes
    
    For example, to change the buffer size to 8 MiB (8,388,608
    bytes) set the following environment variable in the shell used
    to start the IBM MQ Bridge to Salesforce:
    
    
    MQSFB_EXTRA_JAVA_OPTIONS="-Dcom.ibm.mq.runmqsfb.jettyHttpClientT
    ransportMaxMessageSizeBytes=8388608"
    
      This Java system property will only accept values which are
    greater than 1 MiB.  If you specify a value smaller than this,
    the IBM MQ Bridge to Salesforce will use a value of 1 MiB.
    
    
    In terms of advice for the value to use, it is difficult to
    provide a concrete recommendation as it depends on the amount of
    HTTP traffic which Salesforce sends across the network for your
    particular scenario.
    
    For guidance, the new default of 4 MiB was found in testing to
    be satisfactory to be able to consume:
    
        100 platform events queued up
        Each platform event contained 100 fields of 255 bytes in
    size  (~ 25 KiB of data)
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.2 LTS   9.2.0.30
    v9.3 LTS   9.3.0.20
    
    
    The latest available maintenance can be obtained from
    'IBM MQ Recommended Fixes'
    https://www.ibm.com/support/pages/recommended-fixes-ibm-mq
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'IBM MQ
    Planned Maintenance Release Dates'
    https://ibm.biz/mqplannedmaintenance
    
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT39543

  • Reported component name

    MQ BASE V9.2

  • Reported component ID

    5724H7281

  • Reported release

    920

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-01-04

  • Closed date

    2024-04-30

  • Last modified date

    2024-04-30

  • 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

    MQ BASE V9.2

  • Fixed component ID

    5724H7281

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"920","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"}}]

Document Information

Modified date:
30 April 2024