IBM Support

In WebSphere Application Server Version 7.0, asynchronous puts are unexpectedly enabled for WebSphere MQ messaging provider queues and topics migrated from a previous version, or created with AdminConfig

Troubleshooting


Problem

When a WebSphere MQ messaging provider queue or topic is migrated from WebSphere Application Server Version 6.1 or earlier, asynchronous puts are enabled unexpectedly when receiving messages from the queue or topic. Asynchronous puts are enabled regardless of the default asynchronous put behaviour for the queue configured in the WebSphere MQ queue manager (this is specified by the queue attribute DEFPRESP). Asynchronous puts are also enabled unexpectedly when receiving messages from WebSphere MQ messaging provider queues and topics created using AdminConfig. Specifically, when MQQueue and MQTopic configuration objects are created without sendAsync being explicity set. The expected default of "As for queue definition" or "As for topic definition" is applied when the administrative console is used to create a WebSphere MQ JMS Queue or Topic object. The expected default is also applied when using the createWMQQueue and createWMQTopic commands, with AdminTask. The createWMQQueue and createWMQTopic commands should be used, in preference to performing AdminConfig actions directly, for all scripts developed for WebSphere Application Server Version 7.0.

Symptom

The most likely symptom is delivery of messages without the JMS correlation identifier being set in the message object.

There are other scenarios where enabling read ahead is undesirable, as described in the Using asynchronous put topic of the WebSphere MQ Version 7 information center.

Cause

The default value for the sendAsync property of the MQQueue and MQTopic configuration classes is "YES". This default is documented in the WebSphere Application Model Documentation, in the web/configDocs subdirectory of a WebSphere Application Server Version 7.0 installation.


However, the documented default of WebSphere MQ messaging provider queues and topics created with the administrative console, or using the createWMQQueue and createWMQTopic commands, is "As per queue definition" or "As per topic definition". The administrative console, and the createWMQQueue and createWMQTopic commands, write a value of "QUEUE_DEFINED" to the sendAsync property of the MQQueue or MQTopic object they create.

Resolving The Problem

Change the "Asynchronously send messages to the queue manager" Advanced property setting for all WebSphere MQ messaging provider queues and topics to "As for queue definition" or "As for topic definition" in the administrative console.

Alternatively, paste the below example Jython script into a file called setDefaultSendAsync.py, and execute it as follows:

  • UNIX, Linux and z/OS platforms:
    PROFILE_ROOT
    /bin/wsadmin.sh -conntype none -lang jython -f /path/to/setDefaultSendAsync.py
  • Windows
    PROFILE_ROOT
    \bin\wsadmin.bat -conntype none -lang jython -f d:\path\to\setDefaultSendAsync.py

Example Jython

import re;

# Build a list of all WMQ queue and topic objects

oList = [];

oList.extend(re.split('\r?\n', AdminConfig.list('MQTopic')));

oList.extend(re.split('\r?\n', AdminConfig.list('MQQueue')));

# Iterate through all valid objects in the list

for o in oList:

  if o != '':

    # Modify the object to set the default read ahead

    AdminConfig.modify(o, '[[sendAsync QUEUE_DEFINED]]');

    print "Set default sendAsync for " + o;

# Save the changes

AdminConfig.save();

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Message Service (JMS)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"7.0","Edition":"Base;Developer;Express;Network Deployment;Single Server","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Messaging Service (JMS)","Platform":[{"code":"PF035","label":"z\/OS"},{"code":"","label":"OS\/390"}],"Version":"7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21660175