.
. IBM WebSphere MQ v6.0
. Chapter 3.1 - IBM WebSphere MQI (Message Queueing Interface)
.
====== MQI Notation ======
1. WebSphere MQ Application Programming Reference :
MQPUT1 (Hconn, ObjDesc, MsgDesc, PutMsgOpts, BufferLength, Buffer, CompCode, Reason)
MQPUT (Hconn, Hobj, MsgDesc, PutMsgOpts, BufferLength, Buffer, CompCode, Reason)
MQGET (Hconn, Hobj, MsgDesc, GetMsgOpts, BufferLength, Buffer, CompCode, Reason)
2. Equivalent in C :
MQPUT1 (Hconn, &ObjDesc, &MsgDesc, &PutMsgOpts, BufferLength, Buffer, &CompCode, &Reason)
3. Equivalent in COBOL :
CALL "MQPUT1" USING HONN, OBJDESC, MSGDESC, PUTMSGOPTS, BUFFERLENGTH, BUFFER, COMPCODE, REASON)
====== MQI : Connecting and Disconnecting ======
1. Connect Queue Manager :
MQCONN(QMgrName, Hconn, CompCode, Reason)
MQCONNX(QMgrName, ConnectOpts, Hconn, CompCode, Reason)
2. Disconnect Queue Manager :
MQDISC(Hconn, CompCode, Reason)
====== MQI : Opening and Closing an Object ======
1. Open Object :
MQOPEN(Hconn, ObjDesc, Options, Hobj, CompCode, Reason)
Options = MQOO_INPUT_SHARED + MQOO_FAIL_IF_QUIESCING;
2. Close Object :
MQCLOSE(Hconn, Hobj, Options, CompCode, Reason)
====== MQI : Priority 設定優先權 ======
1. Priority :
- Field in the message descriptor, set by an application to one of the following :
a. A value in the range 0 (lowest) to 9 (highest)
b. MQPRI_PRIORITY_AS_Q_DEF
2. MsgDeliverySequence :
- Attribute of a Local or Model Queue with values :
a. MQMDS_PRIORITY : messages returned by MQGET in priority order.
b. MQMDS_FIFO : messages returned by MQGET in FIFO order.
3. DefPriority :
- Attribute of a Queue specifying the default message priority.
- Used when an application sets Priority to MQPRI_PRIORITY_AS_Q_DEF
4. Conventions (公約優先權) :
- In general, use the default priority.
- Use the same priority as the original message for a reply or a report.
====== MQI : Common Parameters 常見參數 ======
01. MQCC_ : CompCode [Completion Code] 完成碼
- MQCC_OK
- MQCC_WARNING
- MQCC_FAILED
02. MQRC_ : Reason [Reason Code] 理由
03. MQOT_ : ObjectType
- MQOT_Q
- MQOT_PROCESS
- MQOT_Q_MGR
04. MQOO_ : Open Object
- MQOO_INPUT_SHARED
- MQOO_INPUT_EXCLUSIVE
- MQOO_FAIL_IF_QUIESCING
- MQOO_BROWSE (for reading messages on a queue and leaving them there.)
05. MQFB_ : FeedBack
06. MQPMO_ : PutMsgOpts [用於 MQPUT]
- MQPMO_SYNCPOINT
- MQPMO_FAIL_IF_QUIESCING
07. MQMDS_ : MsgDeliverySequence
- MQMDS_PRIORITY (messages returned by MQGET in priority order.)
- MQMDS_FIFO (messages returned by MQGET in FIFO order.)
08. MQGMO_ : GetMsgOpts [用於 MQGET]
- MQGMO_ACCEPT_TRUNCATED_MSG
- MQGMO_BROWSE
- MQGMO_CONVERT (轉碼)
09. MQMT_ : MsgType [Message Type, 用於 Message Descriptor]
- MGMT_DATAGRAM
- MGMT_REQUEST
- MGMT_REPLY
- MGMT_REPORT
10. MGRO_ : Report Options
- MGRO_EXCEPTION (例外)
- MGRO_EXPIRATION (過期)
- MGRO_COA
- MGRO_COD
- MGRO_DISCARD
- MGRO_PAN
- MGRO_NAN
====== MQ小撇步 ======
※ Error Code 查詢: # mqrc 2085
沒有留言:
張貼留言