2007年12月15日 星期六

.
. IBM WebSphere MQ v6.0
. Chapter 5.2 IBM MQ Administration in a Mixed Environment.
.

=== Three fields in the Message Descriptor ===
1. Encoding :
 - Representation of the numeric data in the message.
 - iSeries, Windows, and so forth
  MQENC_NATIVE
2. CodedCharSetId :
 - Representation of the character data in the message.
  MQCCSI_Q_MGR
3. Format :
 - Indicates the nature of the data in the message.
 - Values MQ ... are reserved for WebSphereMQ


=== Requesting Application Data conversion ===
1. Request data conversion on the MQGET call :
 - MQGMO_CONVERT
 - Encoding and CodedCharSetId
  a. On input, requested representation of the message.
  b. On output, what the application actually receives.
 - Conversion performed, if necessary, on the basis of what is contained in the Format field.
 - A warning, and the message returned in its original form, if the conversion cannot be done.
2. Otherwise, request data conversion at the sending end of a message channel :
 - CONVERT(YES)
 - Unconverted messages are put on the Dead Letter Queue at the sending end.


=== What Application Data Conversion Can Be done ? ===
1. Some formats are built-in, and the data conversion is performed
  by a built-in conversion routine :
 - A message consisting entirely of characters.
 - A message structure definedd by WebSphereMQ.
2. A user written data conversion exit is required when :
 - The format of a message is defined by the application, not by WebSphereMQ.
 - A message with a built-in format fails to convert.
3. There is a WebSphereMQ utility to help write a data conversion exit.
 # crtmqcvx SourceFile TargetFile

Exit 掛勾 : —↓_↑—↓_↑—↓_↑—
 - Security Exit
 - Conversion Exit
 - Compress Exit
 - Message Exit


=== What Applications Should Do ===
1. Put messages with the following values in the Encoding and CodedCharSetId fields :
 - MQENC_NATIVE (for native encoding)
 - MQCCSI_Q_MGR (for the same CCSID as the Queue Manager)
2. Put all messages with a format name :
 - MQFMT_STRING (for a message consisting entirely of characters)
3. Use the MQGMO_CONVERT option on the MQGET call :
 - Check what is delivered by the call.
4. If necessary, use CONVERT(YES) at the sending end of a message channel.


=== Command Server === (MQ V6已經自動與QM啟動)
1. Command Queue :
 - SYSTEM.ADMIN.COMMAND.QUEUE
 - Messages contain Programmable Command Format (PCF) commands.
2. Command server process the messages in the Queue :
 # strmqcsv QMgrName 
 # endmqcsv QMgrName (Ends the command server)
 # dspmqcsv QMgrName (Displays the status of the command server)
3. Enables network administration applications :
 - "Single point of control"


=== Support for PCF Commands ===
1. All Queue Managers have a command server which accepts PCF commands,
 except :
 - WebSphereMQ for z/OS Version 5
2. Administration utilities which issue PCF commands :
 - SupportPacs for WebSphereMQ for UNIX, Linux and Windows.
 - Vendor products.
 - # runmqsc -w  (indirect mode)
3. Application using the WebSphereMQ Administration Interface.


=== Program Example ===
1. Assume a utility to purge any Queues that have existed beyond their retention interval (賞味期...哈).

[ Application ]              [ Command Server ]
  MQPUT →→→→→→→→→→→→→→→→ MQGET
          MQCMD_INQUIRE_Q    Inquire attributes
          - generic quene name     of selected queues
  MQGET ←←←←←←←←←←←←←←←← MQPUT
Determine which    - Qname         Response for each
queues have     - RetentionInterval      matching queue
expired, and for     - CreationDate
each one ...      - CreationTime
  MQPUT →→→→→→→→→→→→→→→→ MQGET
          MQCMD_DELETE_Q    Delete named queue
          - QueueName


=== Indirect Mode ===
1. Each WebSphereMQ command is sent within an Escape PCF command to the command Queue
 of the named Queue Manager :
 - Connects to the default Queue Manager.
 - Escape PCF command processed at the target Qeueu Manager.
2. Waits for the replies :
 - Time limit for the wait.
 - Writes a report based on the replies received.

 # runmqsc -w 5 QMgrName  (WaitTime in seconds specifies the indirect mode)

3. Can also send a WebSphereMQ command to the system-command input Queue
 of a z/OS Queue Manager.
 - -x parameter


=== Instrumentation Events === 提供給Monitor程式用
1. Have a Queue Manager report a problem condition immediately :
 - Number of messages on a Queue is increasing.
 - Get requests are inhibited for a Queue.
 - Message channel has stopped.
2. Enabled events are reort as event messages on event Queues :
 - SYSTEM.ADMIN.QMGR.EVENT
 - SYSTEM.ADMIN.PERFM.EVENT
 - SYSTEM.ADMIN.CHANNEL.EVENT
 - SYSTEM.ADMIN.CONFIG.EVENT  (z/OS only)
 - SYSTEM.ADMIN.COMMAND.EVENT  (z/OS only)
 - SYSTEM.ADMIN.LOGGER.EVENT  (not z/OS)


=== Responding to an Instrumentation Event ===
1. Queue Manager events :
 - Enable a Queue for put or get requests if it is not intentionally disabled.
 - Corrent the authorizations for a Queue, or stop unauthorized users
  trying to put messages on the Queue.
2. Performance events :
 - Start a process to clear the backlog of messages.
 - Syspend a process that is putting too many messages on a Queue.
3. Channel events :
 - Restart a CHANNEL.
 - Process the Dead Letter Queue.
4. Logger events :
 - Archive unneeded log files.


=== Dead Letter Queue ===
1. When a problem relating to a message is detected asynchronously,
  an exception report is generated if one has been requested
  and the report is sent to the specified reply-to Queue.
2. The Feedback field in the message descriptor of the report message
  indecates the reason for the report.
3. The original message is put on the Dead Letter Queue unless
  MQRO_DISCARD_MSG is requested as a report option.
4. If a message cannot be delivered, it is put on the Dead Letter Queue
  at the receiving end of a message CHANNEL, if one is defined.
5. Message-retry at the receiving end of a CHANNEL may be useful
  if the problem is only temporary.
6. If CONVERT(YES) is specified in the CHANNEL definition at the sending end
  of a message CHANNEL and a message cannot be converted,
  the message is put on the Dead Letter Queue at the sending end.
7. If a message cannot be put on the Dead Letter Queue,
  the CHANNEL is stopped and the message remains on the Transission Queue.
  A fast non-persistent message, however, is just discarded in these circumstances
  and the CHANNEL ramains open.


=== Dead Letter Queue Handler ===
1. Rules table contains a set of rules.
 - Each rule consists of pattern matching keywords and an action.
 - For each message on the Dead Letter Queue, each rule whose pattern
  matches the message is attempted in turn.
 - A message can be retried, forwarded, discarded or ingored.
 - A message can be forwarded with, or without the dead letter header.
2. Can have multiple instances, each with a different rules table.
3. Source of a sample Dead Letter Queue handler is supplied as well.

 # runmqdlq < Rules_Table

 DESTQM(QM17) ACTION(FWD) FWDQ(&DESTQ) FWDQM(QM17A)
 MSGTYPE(MQMT_REPORT) FEEDBACK(MQFB_EXPIRATION) ACTION(DISCARD)
 REASON(MQRC_Q_FULL) ACTION(RETRY)
 DESTQ(XYZ*) ACTION(FWD) FWDQ(XYZ_DEADQ) FWDQM(' ')


=== Using Dead Letter Queues ===
1. Create a Dead Letter Queue on all Queue Managers :
 - Use message-retry on message CHANNELs for transient conditions.
 - Consider "return to sender".
2. Use a Dead Letter Queue handler :
 - Trigger when a message arrives on the Dead Letter Queue.
 - Possibly attempt further retries.
 - If unsuccessful, forward to an application Dead Letter Queue associated with :
  a. The distination Queue.
  b. The application specified by the PutApplName field in the message descriptor.
3. Don't allow an application Dead Letter Queue to become full.

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月15日 星期六

.
. IBM WebSphere MQ v6.0
. Chapter 5.1 IBM WMQ Configuration for Distributed Queuing.
.

=== Identifying a Queue in the MQI ===
1. A Queue is identified by :
 - The name of the Queue.
 - The name of the Queue Manager which owns the Queue.
2. A Queue may be referenced in two places :
 - Object descriptor, on an MQOPEN or MQPUT1 call.
  a. ObjectName
  b. ObjectQMgrName
 - Message descriptor, to specify a reply-to Queue.
  a. ReplyToQ
  b. ReplyToQMgr
3. In an object descriptor, if ObjectQMgrName is blank, the Queue with the
 name specified in ObjectName must be defined in one of the following places :
 - The Local Queue Manager.
 - The name service.


=== Assured Delivery ===
1. Whether an application is putting a message on a Local Queue or to a Remote Queue
 is transparent to the applcation.
2. However, an application always gets a message from a Local Queue.




=== Queue Definitions for Distributed Queuing ===
1. Local definition of a Remote Queue (Remote Local Queue) :
  DEFINE QREMOTE(BBB) RNAME(YYY) RQMNAME(QM2)
2. A Transmission Queue must be created at the SENDing end of each message channel :
 - USAGE(XMITQ) indicates its purpose.
 - Otherwise, it may have any of the attributes of a Local Queue.
  DEFINE QLOCAL(QM2) USAGE(XMITQ)
3. As usual, give a Transmission Queue the same name as the Remote Queue Manager.
(只有SENDER端有XMIQ,且通常命名為要傳送那端的QM)

※ 所以想要建立一個 Remote Queue ,必須提供:
1. RQ Name
2. Remote Local Q Name
3. Remote QM Name
4. XMITQ


※ 對應的 Channel :
1. CHLTYPE - Channel Type
2. (SDR) Connection Name
3. XMITQ (與上面的XMIT串接)


=== Message Channel combinations ===
1. A sender can initiate a communications connection with a receiver and then sned message to it. This is the most common combination. A fully defined server may also perform the same role as a sender in this combination.
 QM1 [ SENDER (SERVER) ] → 開connection → [RECEIVER] QM2
                ↘→ 送 messages →↗

2. A requester can initiate a communications connection with a server which then sends messages to the same requester. 
 QM1 [ REQUESTER ] → 開connection(REQ) → [SERVER (channel) ]
         ↖←←←←← 送messages ←←←←←↙
3. A requester can initiate a communications connection with a sender which promptly terminates the connection. The sender then starts a communications connection according to the information in its Channel definition and sends messages to the partner it has started. This combination is know as callback.
 QM1 [REQUESTER ] → (REQ) → [ SENDER ]
                   ↙
   QM3 [RECEIVER] ←Callback←↙



※ 與Client Channel不同點 : SVRCONN, 是client的方式連上.


=== Attributes of a Message Channel ===
1. Required for definition :
 - Channel-Name   (Up to 20 characters)
 - CHLTYPE     SDR, RCVR, SVR, RQSTR, SVRCONN
 - TRTYPE      DESNET, LU62, NETBIOS, SPX, TCP(default)
 - CONNAME(string)  (for SDR and RQSTR only, optional for SVR)
 - XMITQ(string)    (for SDR and SVR only)

※ TRTYPE 預設為 TCP,可省略.
※ CONNAME('127.0.0.1(1414)') 或 CONNAME(host) 亦可,預設 1414 port

2.Required for SNA LU6.2 :
 - MODENAME(string)
 - TPNAME(string)

※ The WebSphere MQ command to define a message channel at one end is :
 - DEFINE CHANNEL
 - ALTER CHANNEL
 - DISPLAY CHANNEL
 - DELETE CHANNEL

※ Attribute not supplied on the DEFINE CHANNEL command are taken from the appropriate default channel object.
 - SYSTEM.DEF.SENDER
 - SYSTEM.DEF.RECEIVER
 - SYSTEM.DEF.SERVER
 - SYSTEM.DEF.REQUESTER


=== DEFINE CHANNEL Example ===
[ QMAA ]
S.1 DEF CHL('QMA_QMB') CHLTYPE(SDR) TRPTYPE(TCP) +
   CONNAME(host1) XMITQ('QMB')

S.2 DEF QL(QMB) USAGE(XMITQ)

S.3 DEF CHL('QMB_QMA') CHLTYPE(RCVR) TRTYPE(TCP)
--- --- --- --- --- ---
[ QMBB ]
R.1 DEF CHL('QMA_QMB') CHLTYPE(RCVR) TRPTYPE(TCP)

R.3 DEF CHL('QMB_QMA') CHLTYPE(SDR) TRPTYPE(TCP) +
   CONNAME(host2) XMITQ('QMA')

R.4 DEF QL('QMA') USAGE(XMITQ)
--- --- --- --- --- ---


=== Choosing a Transmission Queue ===
1. A Local definition of a Remote Queue can specify :
  DEFINE QREMOTE(BBB) RNAME(YYY) RQMNAME(QM2) XMITQ('Express')
2. The name of the Transmission Queue is inferred from the name of the Remote Queue Manager.
3. A default Transmission Queue can be specified by an attribute of the Queue Manager object.
  ALTER QMGR DEFXMITQ(HOST)
4. Error - the MQOPEN fails.


=== Configuring TCP/IP for WebSphereMQ ===
1. [UNIX/Linux] configure the inet daemon, inetd,...
 - /etc/services :
  MQSeries 1414/tcp      # MQSeries Channel Listener
 - /etc/inetd.conf
  WebSphereMQ stream tcp nowait root /usr/mqm/bin/amqcrsta amqcrsta -m QM
  or
  WebSphereMQ stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m QM

 ※ The inet daemon then has to be refreshed.
  - AIX issue # refresh -s inetd
  - HP-UX issue # inetd -c

2. may use the WebSphereMQ Listener, runmqlsr

 ※ The WebSphereMQ command START LISTENER can also be used to start the Listener.
   On iSeries, UNIX Systems and Windows, this command is valid for CHANNELs
   for which TRTYPE is TCP.


=== Starting a Message Channel ===
1. WebSphereMQ commands :
 - PING CHANNEL(QMA_QMB)
 - START CHANNEL(QMA_QMB)
2. Control command :
 - # runmqchl -c QMA_QMB
3. Channel attributes compared :
 - BATCHSZ   (default=50, 若兩邊channel大小不同,以小的為準)
 - MAXMSGL   (也是以小的為準)
 - SEQWRAP   (counter, default=999999999, 必須一致)
 - HBINT     (HeatBeat interval)
 - NPMSPEED  (Non-Persistence, Fast or Normal)

If the SEQWRAP value on a SENDER CHANNEL is different from the value on the RECEIVER,
  what will happen ? => The CHANNEL will not start.
NPMSPEED(FAST) is a parameter on a CHANNEL that causes the message CHANNEL agent to use
  MQGMO_SYNCPOINT_IF_PERSISTENT
CURSEQNO(3)必須一致,但有時不Sync,就必須RESET CHANNEL,清為0
INDOUBT(NO)為正常,若為YES,就必須RESOLVE CHANNEL( ) ACTION COMMITBACKOUT
A sender CHANNEL is defined in a script file with REPLACE.
  The runmqsc control command is run using this script while the CHANNEL is active.
  => The CHANNEL will fail and won't restart without intervention.


=== CHANNEL Initiator === (此為舊的機制)
The CHANNEL Initiator is a special trigger monitor for starting a message channel. It also contains retry logic for use in case of difficulty in starting a channel or after an error on a channel.
1. START CHINIT INITQ('Channel.InitQ')
 Trigger monitor for Trainsmission Queues :
  - Starts an MCA at the sending end of a message channel.
  - UserData attribute of the process object specifies the Channel name.
  - Or, TrigData attribute of the Transmission queue specifies the channel name.
2. Also a control command :
 # runmqchi -q Channel.InitQ
3. Channel control parameters :
 - DISCINT (SDR and SVR)
  (Max time to wait for a message on the Transmission Queue, if it is empty.
  If no message arrives whin this time, the channel closes down.)
 - SHORTRTY, SHORTTMR (SDR and SVR)
  (Short retry count and shot retry time interval to control repeated attempts to
  establish a communications connection.)
 - LONGRTY, LONGTMR (SDR and SVR)
 - MRRTY, MRTMR (RCVR and RQSTR)
  (Message-retry count and message-retry interval when attempting to
  put a message on a distination queue.
  If every attempt fails, the MCA decides that it cannot deliver the message.)
 - MCATYPE (SDR, SVR and RQSTR)
  (The value of this parameter may be THREAD or PROCESS.
  If THREAD is specified, each channel runs a thread within the CHANNEL Initiator process.
  If PROCESS is specified, each channel runs as a separate process.)
 - BATCHINT (SDR and SVR)
  (The period of time during which a channel will keep a batch open
  if there are no messages on the Transmission Queue.
  This should be set to a value considerably less than the value of DISCINT)


=== Channel Status ===
1. The current state of a channel can be determined by using the WebSphereMQ command :
 DISPLAY CHSTATUS


=== Queue Manager Alias ===
1. A Default Transmission Queue allows a message to be delivered through multiple Queue Managers
 [QMC] ←→ □□□□□□    □□□□□□  ←→ [QME]
        □ QMA □ ←→ □ QMB □
 [QMD] ←→ □□□□□□    □□□□□□ ←→ [QMF]

2. A Queue Manager Alias may also be needed :
 - for example, in QMA :
  DEFINE QREMOTE(QMF) RQMNAME(QMF) XMITQ(QMB)

※ Multi-Hopping :
 - 可克服 firewall 限制考量.
 - 可克服轉碼問題 ->[819]--->RCVR channel[1208 ]SDR channel--->[950]->


=== Separating Message Flows ===
  QM1                         QM2
 □□□□□□□□□□□□        □□□□□□□□□□□□□
 □        QM2□→→→→→→→→ □           □
 □           □←←←←←←←← □QM1        □
 □ [X] →→→→ QM2A □→→→→→→→→ □ →→→→ QL.SERV  □
 □  QL.REPLY ←←←□←←←←←←←← □ QM1A ←←←← [Y]  □
 □□□□□□□□□□□□        □□□□□□□□□□□□□


1. Local Def. of Remote Q :
 DEF QR(QR.SERV) RNAME(QSERVE) RQMNAME(QM2) XMITQ(QM2A)
2. Reply_to_Q Alias :
 DEF QR(QR.REPLY) RNAME(QL.REPLY) RQMNAME(QM1)
3. QM alias (Reply Msg) :
 DEF QR(QM1A) RQMNAME(QM1)

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日

.
. IBM WebSphere MQ v6.0
. Ex 3 - IBM WebSphere MQ Recovery
. 讓我們來練習一下 MQ 的 Recovery
.

=== Exercise 3 : Recovery ===
What we will do :
A. Create a Queue Manager with LINEAR logging.
B. Put persistent and non-persistent messages on Local Queues.
C. Stop and restart a Queue Manager.
D. Recover a danaged Local Queue from its media image.
E. Record manually media images to optimize media recovery.


======================================================
[A. Create a Queue Manager with LINEAR logging.]
1. Create a new Queue Manager named QML00A with LINEAR logging :
 # crtmqm -ll QML00A   (QML00A is your Queue Manager)

※ Default is CIRCULAR, so must add -ll
 - 由 /var/mqm/mqs.ini 定義 LogType=CIRCULAR
 - Windows 下
  HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\LogDefaults
 - LogType=CIRCULAR 可改成 LogType=LINEAR

※ 檢查方式為 /var/mqm/qmgrs/QML00A/qm.ini, LogType=LINEAR

2. Start the Queue Manager :
 # strmqm QML00A

[B. Put persistent and non-persistent messages on Local Queues.]
3. Prepare two Local Queues, the default persistence of each Queue should be set YES.
 # runmqsc QML00A
 DEF QL(QL.A) DEFPSIST(YES) REPLACE
 DEF QL(QL.B) DEFPSIST(YES) REPLACE


 Prepare two Alias Queues, the default persistence of each Alias Queue should be set NO.
 DEF QA(QA.A) TARGQ(QL.A) DEFPSIST(NO) REPLACE
 DEF QA(QA.B) TARGQ(QL.B) DEFPSIST(NO) REPLACE

 Clear the Local Queues :
 CLEAR QL(QL.A)
 CLEAR QL(QL.B)


4. Using amqsput to PUT a mixture of persistent and nonpersistent messages.
 - Persistent messages naming the Local Queue.
 - Non-Persistent messages aming the Alias Queue.
 # amqsput QL.A QML00A (放入 Persistent messages)
 # amqsput QA.A QML00A (放入 Non-Persistent messages)
 # amqsput QL.B QML00A
 # amqsput QA.B QML00A

5. Using amqsbcg to browse the messages on the Local Queue QL.A
 # amqsbcg QL.A QML00A

[C. Stop and restart a Queue Manager.]
6. Stop the Queue Manager and then start it again.
 # emdmqm [-i] QML00A
 # startmqm QML00A

7. Browse the messages on Queue QL.A by using the amqsbcg application. Check that only the persistent messages are on the Local queue QL.A have survived the restart.
 # amqsbcg QL.A QML00A
  (Non-Persistence Messages will disappear !!! )

[D. Recover a danaged Local Queue from its media image.]
8. Execute rcdmqimg agaist the Queue QL.B . This allows you to see how the record image can force a checkpoint which is useful fir Queues that never (or infrequently) reach a depth of zero where a checkpoint is done automatically.
 # rcdmqimg -m QML00A -t ql QL.B

9. Locate the file implementing Local Queue QL.B within the file system and damage the Queue by deleting the file.
 /var/mqm/qmgrs/QML00A/queues/QL!B/q   (UNIX)
 
 Program Files\IBM\WebSphere MQ\Qmgrs\QML00A\queues\QL!B\Q   (Windows)

10. Display the attributes of Local Queue QL.B using the DISPLAY QUEUE command.
This might still work if the Queue Manager does not need to access the Queue file in order to provide the requested information.
 # runmqsc QML00A
  DISPLAY Q(QL.B)

  DISPLAY Q(QL.B)
   1 : DISPLAY Q(QL.B)
  AMQ8149: WebSphere MQ 物件已損壞。
   [2016, QL.B]
  AMQ8101: 發生 WebSphere MQ 錯誤 (893)。
   [1012, 20]

11. Browse Local Queue QL.B . The Queue Manager should now detect that the Queue has been damaged and report the fact.
 # amqsbcg QL.B QML00A

  AMQSBCG0 - starts here
  **********************
  MQOPEN - 'QL.B'
  MQOPEN failed with CompCode:2, Reason:2101
  MQDISC

[E. Record manually media images to optimize media recovery.]
12. Recover Local Queue QL.B from its media image.
 # rcrmqobj -m QML00A -t ql QL.B

13. Check that you can now again display the attribute of the Queue.
 # runmqsc QML00A
  DISPLAY Q(QL.B)

14. Broswe the Local Queue QL.B again to check if the messages are recovered successfully.
 # amqsgbr QL.B QML00A
 What about the nonpersistent messages ?

15. Get the messages from the Queue.
 # amqsget QL.B QML00A

16. Stop and Delete the Queue Manager.
 # endmqm [-i] QML00A
 # dltmqm QML00A

17. 打完收工! : )

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日

.
. IBM WebSphere MQ v6.0
. Chapter 4.3 IBM MQ Transaction Recovery
.

=== Message Persistence ===
1. Persistent messages are recovered on restart, if necessary.
2. Nonpersistent messages are expressly discarded on restart.
3. Logging has performance impact.
4. DefPersistence attribute of a Queue.
5. Any Queue may store both persistent and nonpersistent messages,
  except a Temporary Dynamic Queue

※ Non-persistent messages can be used for better performance when it is not critical for
  messages to be able to survive a Queue Manager restart.

※ Both persistent and nonpersistent messages may be stored on the same Queue.
 The only exception to this is a Temporary Dynamic Queue which can only store
 non-persistent messages.


=== Types of Log ===
1. CIRCULAR (default) :
 - Log files viewed as a closed loop.
 - Amount of disk space required for the log does not increase with time.
 - 足夠大的Circular Log, 才能作所有的Transaction.
2. LINEAR :
 - Log files viewed as a sequence.
 - Log file never deleted BUT
  -- Becomes inactive when it contains no entries required to restart the Queue Manager.
  -- Can be archived when it becomes inactive.
 - Needed for media recovery.

※ Periodically, the Queue Manager performs a log checkpoint. Information about the last
 checkpoint, including its location in the log, is held in the checkpoint file, amqalchk.fil


=== Recovering Persistent Messages ===
1. If nessary, persistent messages are recovered automatically when the Queue Manager is restarted.
2. A damaged Local queue may only be detected later :
 - Reported as "object damaged".
 - Normally needs to be recovered manually.
3. In order to restart, a Queue Manager only requires :
 - Log records written since the last checkpoint.
 - Log records written by transactions that were still active at the time the Queue Manager stopped.


=== Damaged Objects and Media Recovery ===
1. WebSphere MQ objects can be marked as damaged :
 - Corrupt data in the Queue file.
 - Missing Queue file.
 - Disk failure.
2. Damaged objects can be deleted.
3. A damaged object can be re-created from a LINEAR log :
 - Known as media recovery
 - Media images of some objects are recorded automatically by the Queue manager at certain times.
 - Record the media images of a Local Queue on a regular basis using the control command rcrmqobj

※ The control command to record a media imge is rcdmqimg.
 For example, the following command will record a media image of a Local Queue : 
 # rcdmqimg -m QMgrName -t QLocal QName

※ A damaged object can be re-created by using the rcrmqobj control command.
 For example, the following command will recreate a Local Queue :
 # rcrmqobj -m QMgrName -t QLocal QName


=== Dumping the Log ===
1. Use dmpmqlog to dump a formatted version of the log.
2. Queue Manager must not be running.
3. By default, the dump commences from the head of the log.
 Optionally, the dump can commence from :
  - The base of the log.
  - A log record identified by a specified log sequence number (LSN).
  - A log file identified by a specified extent number (linear logs only)
4. Log records formatted include :
 - Put and get of persistent messages.
 - Transaction events.
 - Creation, alteration, and deletion of MQ objects.


=== Syncpoint Control ===
 MQGET (customer order)
 Update DB
 MQPUT (dispatch request)
 MQPUT (delivery confirmation)
 Commit

1. Option on MQPUT and MQGET calls :
 - NO_SYNCPOINT (message is added or removed immediately)
 - SYNCPOINT (result of an MQPUT or an MQGET call only becomes visible
        when the unit of work is committed.)
2. Default is platform-dependent.
3. Additional option on an MQGET call :
 - SYNCPOINT_IF_PERSISTENT (a message is only got within syncpoint control if it is persistent)

=== Compensating Transactions ===
1. MQSeries Asynchronous Model :
    □□□□□□□       □□□□□□□□
[DB] ← □ (Write)  □        □      □
    □     □       □      □
    □   Put □ → [q] → [Q] → □ Get    □
    □Syncpoint □       □    (Write) □→ [DB]
    □     □       □ Syncpoint  □ 
    □□□□□□□       □□□□□□□□
 => [Q] → [(Get) Syncpoint (Write)] → [DB]


2. Local syncpoint participation = committed changes


=== Coordinating Local Units of Work ===
※ A Local unit of work is one in which the only resource being updated are those
 of the Queue Manager. (QM Scope)

 MQGET message from server queue
 MQPUT extra requests
 MQPUT reply message
 
 if error ...
  MQBACK
 if OK ...
  MQCMIT



=== Internal Coordination of Global Units of Work ===
※ A Global unit of work is one in which the resources of other resource managers
 are also being updated.

 MQBEGIN 
 MQGET
message from server queue
 EXEC SQL INSERT database record
 MQPUT reply message
 
 if error ...
  MQBACK
 if OK ...
  MQCMIT



=== Database Coordination ===
1. Support database managers :
 - Platform with Linux, Sun solaris, AIX, HP-UX, Windows
 - Database with Oracle, DB2, Informix, Sybase
2. Restrictions :
 - An WebSphere MQ client cannot particaipate in a global unit of work. (MQBEGIN call)
 - Only one Queue Manager may participate in a global unit of work.
 - Normally, updates to WebSphere MQ and database resources must be made on the same system. (Database server may be on a different system provided it can supply an XA compliant client feature.)


=== External Coordination of Global Units of Work ===
※ Single phase commit protocol only :
1. AIX :
 - TXSeries
 - BEA Tuxedo
 - BEA WebLogic Server
 - WebSphere Application Server
2. Sun Solaris :
 - TXSeries
 - BEA Tuxedo
 - BEA WebLogic Server
 - WebSphere Application Server
3. Linux :
 - BEA Tuxedo
 - BEA WebLogic Server
 - WebSphere Application Server
4. HP-UX :
 - TXSeries
 - BEA Tuxedo
 - BEA WebLogic Server
 - WebSphere Application Server
5. Compaq NonStop Kernel :
 - TM/MP (TMF)
6. Windows :
 - TXSeries
 - BEA Tuxedo
 - BEA WebLogic Server
 - WebSphere Application Server
 - MTS/COM


=== CICS Transaction ===
1. A CICS transaction may issue MQI calls.
2. A CICS trigger monitor can start a CICS transaction when a message arrives in a Queue.
3. Only one Queue Manager can be assessed at a time from a single CICS region.
 - Using CICS with a two-phase commit protocol.

※ On AIX, HP-UX, Solaris, and Windows , there is a supplied trigger monitor which runs as a CICS transaction. The process object specifies which transaction to start.
 APPLTYPE CICS
 APPLICID Transaction ID
The trigger monitor performs EXEC CICS START and passes MQTMC2 as CICS data.
If the trigger monitor is started withous data, it gets the trigger messages from SYSTEM.CICS.INITIATION.QUEUE

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日
 

.
. IBM WebSphere MQ v6.0
. Chapter 3.3 - IBM WebSphere Publish / Subscribe
.

====== MQ Publish / Subscribe (Topic) ======
※ MQ Messages are the vehicle (傳播媒介) used to transport the information between publishers and subscribers. The subject of that information is called a topic.

※ There is a requirement for a middleman to handle the proper routing of information. This is handled by a broker.

Topics that are related can be grouped into streams; allowing for fewer total items that the broker needs to manage. It also makes access control simpler. If topic does not belong to a particular stream, the broker has a default stream.

Broker configuration can become very complex with many brokers in a network. However - only one broker is allowed per Queue Manager.


====== Setting Up the Broker ======
※ Queues for each broker automatically defined when broker starts if they do not exist :
 - SYSTEM.BROKER.CONTROL.QUEUE
 - SYSTEM.BROKER.DEFAULT.STREAM
 - SYSTEM.BROKER.ADMIN.STREAM
 - SYSTEM.BROKER.MODEL.STREAM
 - SYSTEM.BROKER... (Created by the broker for internal use.)

※ Authorize applications to use these Queues.

※ Update configuration information in qm.ini or broker page of Queue Manager properties in MQ Explorer.


====== Controlling the Broker ======
1. To start a Broker : # strmqbrk (Can be Triggered)
2. To stop a Broker : # endmqbrk
3. To display a Broker : # dspmqbrk
4. To delete a Broker : # dltmqbrk (Broker must be stopped an MQ must active)
5. To clear a Broker : # clrmqbrk
6. To migrate a Broker : # migmqbrk


====== Message Broker Exits ======
※ Allow customization of publications at broker.
 - Can ALTER publication and MQMD

※ Configured in qm.ini or broker page of Queue Manager properties in MQ Explorer.

※ Sample exit provided
 - Changes destination Queue or Queue Manager.

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日

.
. IBM WebSphere MQ v6.0
. Ex2 - Implementing MQ Trigger
. 讓我們來練習一下如何 Implementing MQ 的Trigger
.

====== Exercise 2. Implementing Trigger ======
1. Create an Initiation Queue named QL.INITQ_AP :
 # runmqsc QMC00A (QMC00A is your Queue Manager)
 DEFINE QLOCAL(QL.INITQ_AP) REPLACE

2. Create a Local Queue (named QL.QT1) which is enabled for Triggering :
 DEFINE QL(QL.QT1) REPLACE +
  TRIGGER +
  TRIGTYPE(FIRST) +
  PROCESS(PR.ECHO) +
  INITQ(QL.INITQ_AP)

3. Create a PROCESS (named PR.ECHO) to identify the application to be started. In such a way that amqsech is started synchronously with respect to the execution of the Trigger Monitor.
 DEFINE PROCESS(PR.ECHO) REPLACE +
  APPLICID('/mqmtop/samp/bin/amqsech')
 // UNIX Systems

 DEFINE PROCESS(PR.ECHO) REPLACE +
  APPLICID('amqsech')
         // Windows Systems

4. Use a Dynamic TEMP Queue (named QM.QT1_REPLY) as Reply-to-Queue which is created by a Model Queue :
 DEFINE QMODEL(QM.QT1_REPLY) REPLACE

5. Start the Trigger Monitor using the control command runmqtrm . Name the Initiation Queue.
 # runmqtrm -m QMC00A -q QL.INITQ_AP

 5724-H72 (C) Copyright IBM Corp. 1994, 2004. ALL RIGHTS RESERVED.
 WebSphere MQ 觸發監視器已啟動。
 __________________________________________________
 請等待觸發訊息。



====== Exercise 2.a Test Triggering with amqsinq ======
6. Test Triggering :
 # amqsreq QL.QT1 QMC00A QM.QT1_REPLY
 (打一些字然後按 Enter,會在 Trigger Monitor 視窗)

7. 把 QL(QL.QT1) 設成 TRIGTYPE(EVERY) 再試試看:
 DEFINE QL(QL.QT1) REPLACE +
  TRIGGER +
  TRIGTYPE(EVERY) +
  PROCESS(PR.ECHO) +
  INITQ(QL.INITQ_AP)

8. 把 QL(QL.QT1) 設成 TRIGTYPE(DEPTH) 再試試看:
 DEFINE QL(QL.QT1) REPLACE +
  TRIGGER +
  TRIGTYPE(DEPTH) TRIGDPTH(6) +
  PROCESS(PR.ECHO) +
  INITQ(QL.INITQ_AP)


====== Exercise 2.b Test Triggering with amqsinq ======
9. Create a 2nd PROCESS object for amqsinq :
 DEFINE PROCESS(PR.INQ) REPLACE +
  APPLICID('/mqmtop/samp/bin/amqsinq')
 // UNIX Systems

 DEFINE PROCESS(PR.INQ) REPLACE +
  APPLICID('amqsinq')
 
        // Windows Systems

10. ALTER the QL(QL.QT1) appropriately :
 ALTER QL(QL.QT1) PROCESS(PR.INQ)

11. Run amqsreq again, remembering that amqsinq now expects the application data in each message to contain the name of a Queue. For example, use the names of the following Queues :
 # amqsreq QL.QT1 QMC00A QM.QT1_REPLY
 
 SYSTEM.ADMIN.COMMAND.QUEUE
 QM.QT1_REPLY
 SYSTEM.SAMPLE.REPLY
 QL.QT1
 => Try an invalid Queue name.


===============================
====== 補充:Channel Trigger ======
===============================
※ 不需要 Trigger Monitor,也不需要 Data ,亦可以避免 Channel Expire 的暫停。

[QM1] (Listen : 1414)
 XXX.QR →→→ YYY.QL
 
 QM2.XMITQ ---Trigger
 ---> SYSTEM.CHANNEL.INITQ
 ---> QM1.To.QM2 (SDR)

[QM2] (Listen : 1415)
 YYY.QL
 
 QM1.To.QM2 (RCVR)

  ALTER XMITQ
  TRIGGER Control ON
  TRIGGER TYPE FIRST
  TRIGGER DATA(Channel Name)
  INITIATION QUEUE
  SYSTEM.CHANNEL.INITQ

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日
 

.
. IBM WebSphere MQ v6.0
. Chapter 3.2 - IBM WebSphere MQ Trigger
.

=== Components of Triggering ===
Program A MQPUT A-Q (put a message on an application Queue)--->
 [QM]
  (1)→ Application Queue (which is enabled for triggering)

(If the conditions for triggering are met, a trigger event occurs, and the QM examines the Process Object referenced by the Application Queue)
  (2)→ Process Object

(The QM creates a trigger message whose fields contain information copied from certain attributes of the Process Object and the Application Queue. The QM puts the trigger message on an Initiation Queue.)
  (3)→ Initiation Queue
 [/QM]

(A long running program called a trigger monitor gets the trigger message, examines otscontents, and ...)
  (4)—→ MQGET I-Q (Trigger Monitor)

(... and starts Program B, passing the entire trigger message as a parameter.)
  (5)—→ MQGET A-Q Program B

(Program B opens the Application Queue and gets messages from it.)
  (6)—→ MQGET A-Q Program B


=== Queue Attributes Controlling Triggering ===
※ TRIGGER/NOTRIGGER 是 Queue 的一個參數 :

DEFINE QLOCAL(QL.QT1) TRIGGER +
 PROCESS(ECHO) +
 INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE)


 - TRIGGER or NOTRIGGER : Triggering is active or not active respectively.
 - TRIGMPRI(integer) : 可設定Priority多少以上才Triggering.
 - TRIGTYPE(FIRST or DEPTH or EVERY or NONE) : Triggering四種Type.
 - TRIGDPTH(integer) : 對應 TRIGTYPE(DEPTH)
 - TRIGDATA(string) : Data that is copied into the Trigger Message.


=== PROCESS Attributes (定義PROCESS) ===
DEFINE PROCESS(ECHO) +
 APPLICID('/opt/mqm/samp/bin/amqsech')

DEFINE PROCESS(ECHO) REPLACE +
 APPLICID('C:\Program Files\IBM\WebSphere MQ\Tools\c\Samples\Bin\amqsech.exe')

 - APPLICID(string) : Name of the application to be started.
 - APPLTYPE(UNIX or WINDOWS)
 - ENVRDATA(string) : For use by the trigger monitor.
 - USERDATA(string) : For use by the trigger monitor or the started application.

※ MQ commands for PROCESSes :
 DEFINE PROCESS
 ALTER PROCESS
 DELETE PROCESS
 DISDPLAY PROCESS


=== Fields in the Trigger Message (structure MQTMC2) ===
1. Copied from the corresponding attributes of the application Queue :
 - QName
 - TriggerData
 - ProcessName

2. Copied from the corresponding attributes of the process object :
 - ApplType (MQAT_CSIC, MQAT_UNIX, MQAT_WINDOWS)
 - ApplId
 - EnvData
 - UserData

3. QMgrName :


====== 啟動 Trigger Monitor ======
1. To start a trigger monitor :
 # runmqtrm -m QMgrName -q InitiationQName
 (I-Q 預設會用 SYSTEM.DEFAULT.INITIATION.QUEUE )
 例如 : # runmqtrm -m QMC00A -q SYSTEM.DEFAULT.INITIATION.QUEUE

2. Command issued by trigger monitor to start the application :
# (ApplId) "(MQTMC2)" (EnvData)

3. Other trigger monitors :
 - Client trigger monitor
 - CICS


=== Trigger Monitor Errors (狀況處理) ===
1. Messages are produced by Normal activities (正常), for example :
 - Trigger monitor started.
 - Waiting for a trigger message.
 - Trigger monitor ended.

2. Messages are produced by Abnormal conditions (異常) , for example :
 - Initiation Queue could not be opened.
 - Use of trigger monitor not authorized.
 - Error starting triggered application.

3. A message may be written to :
 - The standard output device.
 - An error log.

4. A Trigger Message is written to the Dead Letter Queue if :
 - The Trigger Message structure is not valid.
 - The Trigger Message specifies an unsupported application type.
 - The Trigger monitor is enable to start the specified application.


======Sample Programs======
# amqsreq QName [QMgrName]
1. This program is invoked from a Command Prompt in exactly the same way as amqsput, but accepts three input parameters.
2. The program reads lines of text from the standard input device, converts them to request messages, and puts the messages on the named Queue.
3. Each request message requires a Reply-to-Queue name specified as the third input parm. If it is ommitted, the name defaults to SYSTEM.SAMPLE.RELAY .
(C:\Program Files\IBM\WebSphere MQ\Tools\mqsc\Samples\amqscos0.tst)
4. If the name resolves to Model Queue, a Dynamic Queue will be created.
5. When the input of text is terminated (null line or EOF), the program waits for the reply messages and writes the text whin each reply message to standard output device.

 例如:# amqsreq QL.TQ1 QMC00A

# amqsech
1. This program is designed to be started by a Trigger Monitor and not from a Command Prompt.
2. The program connects to the Queue Manager named in the structure passed to it by the Trigger Monitor and opens the Queue also named in the structure. This is called the Request Queue in the description that follows.
3. The program gets a message from the Request Queue, create a new message containing the same application data as the original message, and puts the new message on the Reply-to-Queue named in the message descriptor of the original message.
4. The program then gets each of the remaining messages on the Request Queue in turn and generates a reply in the same way.
5. When the Request Queue is empty, the program closes the Queue and disconnects from the Queue Manager.

# amqsinq
1. This program is designed to be started by a Trigger Monitor in the same way as amqsech.
2. The program connects to the Queue Manager, opens the Request Queue, gets a message from the Queue, an interprets the application data as the name of a Queue.
3. The program opens this Queue, calls MQINQ to inquire on the values of three of its attributes, constructs a reply message contain these values, and puts the message on the Reply-to-Queue.
4. The program then gets each of the remaining messages on the Request Queue in turn and generates a reply in the same way.
5. When the Request Queue is Empty, the program closes the Queue and disconnects from the Queue Manager.

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日

.
. IBM WebSphere MQ v6.0
. Chapter 3.1 - IBM WebSphere Message Group and Message Segmentation
.

=== 關於 Message and Correlation Identifiers ===
Two fields in the Message Descriptor :
1. MsgID (message identifier ) :
 If an application specifies MQMI_NONE on an MQPUT call, the Queue Manager
 generates a unique message identifier.

2. CorrelID (correlation identifier) :
 In a reply or report message, it is normally copies from the MsgID of the original message.

※ Both fields are treated as bit strings by the Queue Manager.


=== 關於 Retrieving Messages ===
1. With selection criteria :
 - Set MsgID and/or CorrelID prior to an MQGET call
 - Also ensure that MatchOptions in get message options is set to
  MQMO_MATCH_MSG_ID + MQMO_MATCH_CORREL_ID

2. Without selection criteria :
 - Reset MsgID and CorrelID to MQMI_NONE and MQCI_NONE respectively
  before each MQGET call
 - Or, set MatchOptions in get message options to MQMO_NONE

3. On return from an MQGET call, MsgID and CorrelID are set to the values
  for the message retrieved.


=== Order of Retrieving Messages 取出訊息順序 ===
1. Messages on a Queue can be retrieved by an application in the same order
  they were put by another application, provided :
 - The messages all have the same priority.
 - The messages were all put within the same unit of work, or all put outside of a unit of work.
 - No other application is getting messages from the Queue.
 - The Queue is Local to the putting application.
 - But they may be interspersed with messages put by other applications.

2. If the Queue is not Local to the putting application, the order of retrieval is still
  preserved provided :
 - The first three conditions above still apply.
 - Only a single path is configured for the messages.
 - No message is put on a Dead Letter Queue
 - No nonpersistent messages are transmitted over a fast message channel.


=== 關於 Message Group (Guaranteed 機制) ===
[ Message Group ] <= (Logical message 1) + (Logical message 2) + (Logical message 3)

※ A Message Group : Consists of one or more logical messages.

※ A Logical message is :
 - A physical message (unless it is split into segments).
 - Identified by the GroupID and MsgSeqNumber fields in the message desccriptor.

說明:
1. All logical messages belonging to the same group have the same value for the GroupID field.

2. The MsgSeqNumber field has the value 1 for the first logical message, 2 for the second,
 and so on.There is, therefore, an implied ordering to the logical messages within a group.

3. A physical message which does not belong to any group has the value MQGI_NONE in
 the GroupID field, and the value 1 in the MsgSeqNumber field.


=== 關於Message Group 2 個主要用途 ===
1. To ensure ordering on retrieval in circumstances where this is not already guaranteed.
 - An application is able to put a sequence of messages constituting a Message Group on a Queue by specifying the put message option MQPMO_LOGICAL_ORDER. The Queue Manager generates a unique group identifier (GroupID) and assigns a message sequence number (MsgSeqNumber) to each message as it it put on the Queue.
 - Another application is then able to get the messages constituting the group from the Queue, in the same order they were put, by specifying the get message option MQGMO_LOGICAL_ORDER.

2. To allow an application to group together related messages.
 - This may be useful, for example, if it is important for a group of related messages to be processed by the same server instance, or by a particular server instance. By setting the value MQMO_MATCH_GROUP_ID in the MatchOptions filed in get message options, an application can retrieve only those messages with a specified group Identifier.

※ Needed : (Version 5 and 6 Queue Managers only)
 - To ensure ordering on retrieval (Where it is not already guraranteed).
 - To allow an application to group together related messages.


=== 關於 Message Segmentation ===
為了解決以前的程式,Message buffer固定且小的問題。
※ A segment is :
 - A physical message.
 - Identified by the GroupID, MsgSeqNumber, Offset fields in the message descriptor.

※ Segmentation is needed when a message is too large for an application, a Queue, or a Queue Manager.

※ A message can be segmented and reassembled :
 - By the Queue Manager.
 - By an application.

1. To ask the Queue Manager to segment a message if necessary, the putting application simply sets the value MQMF_SEQMENTATION_ALLOWED in the MsgFlags field of the message descriptor and issues one MQPUT call.

Similarly, the getting application simply specifies the get message option MQGMO_COMPLETE_MSG in order to request the Queue Manager only to return a complete logical message on an MQGET call. And if the logical message is segmented, the Queue Manager reassembles it before returning it to the application.

2. If a message is too large for an application to handle in a songle buffer, the application may perform the segmentation itself by issuing an MQPUT call for each segment. Similarly, an application may issue an MQGET call for each segment of a logical message.

amzshar 發表在 痞客邦 留言(0) 人氣()

2007年12月9日 星期日

.
. 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

amzshar 發表在 痞客邦 留言(0) 人氣()