版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、MQ Primer,Author: Esun.Yang Date:2010-09-08,Object,Understand what is MQ Master the Basic components Can do some of Basic MQ Administration Can do some of Simple MQ problem determination,Agenda,MQ Product Briefing MQ Basic Concept MQ Overview MQ Installation MQ Simple Administration MQ Simple Troubl
2、e shooting,MQ Product Briefing,在分布式計算環(huán)境中,為了集成分布式應用,開發(fā)者需要對異構網絡環(huán)境下的分布式應用提供有效的通信手段。 WebSphere MQ 本質上是一種消息中間件,用于保證異構應用之間的消息傳遞。應用程序通過MQ接口進行互連通信,可以不必關心網絡上的通信細節(jié),從而將更多的注意力集中于應用本身。 消息可靠傳遞 事務處理能力 安全要求,MQ Basic Concept,消息(Message) 在MQ中,我們把應用程序交由MQ傳輸?shù)臄?shù)據定義為消息 消息構成: 消息描述符(Message descriptor或Message Header),描述消息的特
3、征,如:消息的優(yōu)先級、生命周期、消息Id等; 消息體(Message Body),即用戶數(shù)據部分。在MQ中,消息分為兩種類型,非永久性(non-persistent)消息和永久性(persistent)消息,Message Header,Message Body,Message Properties,More Info about Message descriptor,Detail pls ref Expiry Priority Persistence MsgId CorrelId,MQ Basic Concept,隊列(Queue) 隊列是消息的安全存放地,隊列存儲消息直到它被應用程序處理。
4、可以簡單地把隊列看成一個容器 消息隊列以下述方式工作: 程序A形成對消息隊列系統(tǒng)的調用,此調用告知消息隊列系統(tǒng),消息準備好了投向程序B; 消息隊列系統(tǒng)發(fā)送此消息到程序B駐留處的系統(tǒng),并將它放到程序B的隊列中; 適當時間后,程序B從它的隊列中讀此消息,并處理此信息。,MQ Basic Concept,隊列種類: 本地隊列、遠程隊列、模板隊列、動態(tài)隊列、別名隊列等 本地隊列又分為普通本地隊列和傳輸隊列 遠程隊列是目的隊列在本地的定義,它類似一個地址指針,指向遠程主機上的某個目的隊列,它僅僅是個定義,不真正占用磁盤存儲空間。,Attributes of objects,Detail Please r
5、ef CurrentQDepth DefBind DefPersistence NonPersistentMessageClass,MQ Basic Concept,MQI: MQ API also called as MQI WebSphere MQ Script (MQSC) commands WebSphere MQ Explorer,MQ Overview (1 of 4),隊列管理器 隊列管理器是MQ系統(tǒng)中最上層的一個概念,由它為我們提供基于隊列的消息服務, 像一數(shù)據庫實例一樣 隊列 通道 通道是MQ系統(tǒng)中隊列管理器之間傳遞消息的管道,它是建立在物理的網絡連接之上的一個邏輯概念。 通
6、道類型: 消息通道:消息通道是用于在MQ的服務器和服務器之間傳輸消息的,需要強調指出的是,該通道是單向的。 MQI通道:MQI通道是MQ Client和MQ Server之間通訊和傳輸消息用的,與消息通道不同,它的傳輸是雙向的 Cluster通道:群集(Cluster)通道是位于同一個MQ 群集內部的隊列管理器之間通訊使用的。 Listener,MQ Overview (2 of 4),MQCONN MQOPEN PUT And GET MQCLOSE MQDISC,Message,Message,App 1,App 2,Queue,MQ Overview (3 of 4),MQ works,
7、MQ Overview (4 of 4),MQ的通訊模式 點對點通訊 多點廣播 發(fā)布/訂閱(Publish/Subscribe)模式 群集(Cluster),MQ Installation,On Windows On Unix Create mqm group Create mqm user ID Create file system: /usr/mqm & /var/mqm Run smitty More information: AHS_MichelinKnowledgeMQ on SVN,MQ Simple Administration,Create a new MQ instance:
8、 crtmqm -q default qmgr -lc cycled log -ll liner log -lf log file size(4KB) -ld log path Delete the existing MQ instance: dltmqm Start a MQ instance: strmqm Stop a MQ instance: endmqm 受控(或停止) -c 只有在所有應用程序都已斷開連接之后,隊列管理器才停止。所有連接到該隊列的新請求都會失敗。這是缺省模式。 立即 -i 隊列管理器在完成當前正在處理的所有 MQI 調用后停止。輸入此命令后發(fā)出的任何 MQI 調用都
9、將失敗。任何未完成的工作單元將在隊列管理器下一次啟動時回滾。 帶等待的受控 -w 停止隊列管理器的方式與受控選項相同,但是命令提示符要在隊列管理器結束之后才返回。 搶先 -p 隊列管理器停止而不等待應用程序斷開連接或等待 MQI 調用完成。使用此模式可能導致不可預料的結果。,MQ Simple Administration,Display MQ Instance status: dspmq Start MQ Listener: runmqlsr -t TCP -p 1414 -m qmgrname amqsput Put messages on the local queue amqsbcg
10、- Browse the messages of the queue amqsget - Get the messages from the queue to make the queue empty rcdmqimg - Recover a queue from where a checkpoint will be done automatically,MQ Simple Administration,MQ Script (MQSC) commands: runmqsc 在發(fā)送方A: 定義本地傳輸隊列: define qlocal (QMB) usage (xmitq) defpsist(y
11、es) 創(chuàng)建遠程隊列: define qremote (QR.TOB) rname (LQB) rqmname (QMB) xmitq (QMB) 定義發(fā)送通道: define channel (A.TO.B) chltype (sdr) conname (IP of B) xmitq (QMB) + trptype (tcp) 在接收方B: 定義本地隊列QLB: define qlocal (LQB) 創(chuàng)建接收通道: define channel (A.TO.B) chltype (rcvr) trptype (tcp),MQ config files,MQ Configuration Fi
12、le Unix: /var/mqm/mqs.ini Windows: stores similar information in the Windows Registry ( no mqs.ini) Queue Manager Configuration File Unix: /var/mqm/qmgrs/ qm.ini Windows: stores similar information in the Windows Registry,MQ Process,Check the running MQ process ps ef | grep amq ps ef | grep mqm MQ b
13、ase process (on Unix) amqpcsea Command server amqhasmx Logger| amqharmx Log formatter (linear logs only) amqzllp0 Checkpoint processor amqzlaa0 Queue manager agents amqzfuma OAM process amqzxma0 Processing controller amqrrmfa Repository process (for clusters) amqzdmaa Deferred message processor amqr
14、mppa Channel receiver,MQ Simple Trouble shooting,Check the MQ objects status. Error logs Two types Queue Manager Error Logs & System Error Logs Filenames AMQERR01.LOG, AMQERR02.LOG & AMQERR03.LOG Location depends on Operating System UNIX & Linux System /var/mqm/errors QM/var/mqm/qmgrs/errors Windows
15、 Systemc:Program FilesIBMWebSphere MQerrors QM:Program FilesIBMWebSphere MQqmgrserrors Start MQ trace and recreate the problem. strmqtrc -m -l 2000 -t all endmqtrc -m Other OS & related notes ,MQ Simple Trouble shooting,FFST (First-failure support technology) provides report of unexpected event has
16、been detected by a QM, which might affect the ability of that QM to perform its function. can be read directly by an experienced MQ administrator. created some time previous to external symptoms of a problem being observed can be instrumental in understanding the reason for a problem being experienc
17、ed. keep any FFST files created by MQ for a reasonable period to provide it to IBM Service representatives Filenames & Locations (Windows, UNIX) AMQnnnnnnnn_mm.FDC (nnnnnnnn process ID, mm sequence number normally 0) UNIX/var/mqm/errors Windowsc:Program FilesIBMWebSphere MQerrors Other OS & related
18、notes ,MQ Simple Trouble shooting,Troubleshooting steps Ensure that the queue manager is running. Check the information about the return code from the connection action. For applications connecting as clients, ensure that a listener is running for the QM. Ensure that the transport (usually TCP) and
19、connection name are correct for the QM. If a client channel definition table (CCDT) is being used, ensure that the location specified for this file is correct. For JMS applications, these are specified on the connection factory object in the directory being accessed through JNDI, which must be acces
20、sible from the application. For applications connecting as clients, ensure that the channel name being used matches a server connection channel on the queue manager, or that the channel auto-definition (CHAD) has been enabled on the QM. Channel names are case-sensitive and must match. Ensure that th
21、e QM name specified by the application is correct, including the case. For applications connecting as clients using a CCDT, ensure that the client connection channel object, defined on the QM that created the CCDT, has the correct QM name (QMNAME) attribute. View the WebSphere MQ system error logs. View the queue manager error logs for the queue manager to which the connection is failing. Ensure that the user identifier under which the application is connecting has authority to connect to the QM.,MQ Simple Trouble shooting,Message
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年中職肌電圖技術(肌電圖基礎)試題及答案
- 2025年高職應用化工(化工工藝設計)試題及答案
- 2025年大學三年級(檔案學)檔案保管綜合測試題及答案
- 2025年大學核化工技術(核化工應用)試題及答案
- 2025年中職中餐烹飪(閩菜制作)試題及答案
- 2025年高職(市政工程技術)橋梁養(yǎng)護技術階段測試題及答案
- 2025年中職休閑體育服務與管理(健身課程指導)試題及答案
- 2025年大學護理(中醫(yī)護理理論)試題及答案
- 初二語文(專題突破)2027年上學期單元測試卷
- 2025年高職模具設計與制造(模具加工工藝)試題及答案
- 醫(yī)院18類常用急救藥品規(guī)格清單
- 斜弱視眼科學
- 電商平臺需求規(guī)格說明書-通用版本
- GB/T 3372-2010拖拉機和農業(yè)、林業(yè)機械用輪輞系列
- 北京城市旅游故宮紅色中國風PPT模板
- 經濟學原理 第一章課件
- 安川伺服說明書
- 社會組織管理概論全套ppt課件(完整版)
- 酒精度檢測原始記錄
- 冷渣機檢修工藝
- 建筑風水學培訓
評論
0/150
提交評論