+

Search Tips | Advanced Search

Queue Manager Response message

A Queue Manager Response message is sent from a queue manager to the ReplyToQ of a publisher or a subscriber, to indicate the success or failure of a command message received by the queue manager if the command message descriptor specified that a response is required.

The response message is contained within the NameValueData field of the MQRFH2 header, in a <pscr> folder.

In the case of a warning or error, the response message contains the <psc> folder from the command message as well as the <pscr> folder. The message data, if any, is not contained in the queue manager response message. In the case of an error, none of the message that caused an error has been processed; in the case of a warning, some of the message might have been processed successfully.

If there is a failure sending a response:

  • For publication messages, the queue manager tries to send the response to the IBM MQ dead-letter queue if the MQPUT fails. This allows the publication to be sent to subscribers even if the response cannot be sent back to the publisher.
  • For other messages, or if the publication response cannot be sent to the dead-letter queue, an error is logged and the command message is normally rolled back. Whether this happens depends on how the MQInput node has been configured.

Parent topic: Queued publish/subscribe command messages


Properties

    Completion (MQPSCR_COMPLETION)
    The completion code, which can take one of three values:

      ok
      Command completed successfully

      warning
      Command completed but with warning

      error
      Command failed

    Response (MQPSCR_RESPONSE)
    The response to a command message, if that command produced a completion code of warning or error. It contains a <Reason> property, and might contain other properties that indicate the cause of the warning or error.

    In the case of one or more errors, there is only one response folder, indicating the cause of the first error only. In the case of one or more warnings, there is a response folder for each warning.

    Reason (MQPSCR_REASON)
    The reason code qualifying the completion code, if the completion code is a warning or error. It is set to one of the error codes listed in the following example. The <Reason> property is contained within a <Response> folder. The reason code can be followed by any valid property from the <psc> folder (for example, a topic name), indicating the cause of the error or warning. If you get a reason code of ????, check the data for correctness, for example, matching angled brackets (< >).


Examples

Here are some examples of NameValueData in a Queue Manager Response message. A successful response might be the following:
 <pscr>
   <Completion>ok</Completion>
 </pscr>
Here is an example of a failure response; the failure is a filter error. The first NameValueData string contains the response; the second contains the original command.
 <pscr>
   <Completion>error</Completion>
   <Response>
     <Reason>3150</Reason>
   </Reponse>
 </pscr>
 
 <psc>
  ...
  command message (to which
  the queue manager is responding)
  ...
</psc>
Here is an example of a warning response (due to unauthorized topics). The first NameValueData string contains the response; the second NameValueData string contains the original command.
 <pscr>
   <Completion>warning</Completion>
   <Response>
     <Reason>3081</Reason>
     <Topic>topic1</Topic>
   </Reponse>
   <Response>
     <Reason>3081</Reason>
     <Topic>topic2</Topic>
   </Reponse>
 </pscr>
 
 <psc>
  ...
  command message (to which
  the queue manager is responding)
  ...
 </psc>

Last updated: 2020-10-04