官方的解釋是
MQRC_NO_MSG_AVAILABLE (2033)
![]()
Explanation: An MQGET call was issued, but there is no message on the queue satisfying the selection criteria specified in MQMD (the MsgId and CorrelId fields), and in MQGMO (the Options and MatchOptions fields). Either the MQGMO_WAIT option was not specified, or the time interval specified by the WaitInterval field in MQGMO has expired. This reason is also returned for an MQGET call for browse, when the end of the queue has been reached.
![]()
This reason code can also be returned by the mqGetBag and mqExecute calls. mqGetBag is similar to MQGET. For the mqExecute call, the completion code can be either MQCC_WARNING or MQCC_FAILED:
![]()
If the completion code is MQCC_WARNING, some response messages were received during the specified wait interval, but not all. The response bag contains system-generated nested bags for the messages that were received.
If the completion code is MQCC_FAILED, no response messages were received during the specified wait interval.
Completion Code: MQCC_WARNING or MQCC_FAILED
![]()
Programmer Response: If this is an expected condition, no corrective action is required.
![]()
If this is an unexpected condition, check that:
![]()
The message was put on the queue successfully.
The unit of work (if any) used for the MQPUT or MQPUT1 call was committed successfully.
The options controlling the selection criteria are specified correctly. All of the following can affect the eligibility of a message for return on the MQGET call:
MQGMO_LOGICAL_ORDER
MQGMO_ALL_MSGS_AVAILABLE
MQGMO_ALL_SEGMENTS_AVAILABLE
MQGMO_COMPLETE_MSG
MQMO_MATCH_MSG_ID
MQMO_MATCH_CORREL_ID
MQMO_MATCH_GROUP_ID
MQMO_MATCH_MSG_SEQ_NUMBER
MQMO_MATCH_OFFSET
Value of MsgId field in MQMD
Value of CorrelId field in MQMD
Consider waiting longer for the message.
![]()
|
也就是說這個錯誤的引發是因爲MQ內沒有消息,而我卻執行了獲取消息的操作,相當於告訴你MQ裏面是空的