版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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,在分布式计算环境中,为了集成分布式应用,开发者需要对异构网络环境下的分布式应用提供有效的通信手段。 WebSphere MQ 本质上是一种消息中间件,用于保证异构应用之间的消息传递。应用程序通过MQ接口进行互连通信,可以不必关心网络上的通信细节,从而将更多的注意力集中于应用本身。 消息可靠传递 事务处理能力 安全要求,MQ Basic Concept,消息(Message) 在MQ中,我们把应用程序交由MQ传输的数据定义为消息 消息构成: 消息描述符(Message descriptor或Message Header),描述消息的特
3、征,如:消息的优先级、生命周期、消息Id等; 消息体(Message Body),即用户数据部分。在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形成对消息队列系统的调用,此调用告知消息队列系统,消息准备好了投向程序B; 消息队列系统发送此消息到程序B驻留处的系统,并将它放到程序B的队列中; 适当时间后,程序B从它的队列中读此消息,并处理此信息。,MQ Basic Concept,队列种类: 本地队列、远程队列、模板队列、动态队列、别名队列等 本地队列又分为普通本地队列和传输队列 远程队列是目的队列在本地的定义,它类似一个地址指针,指向远程主机上的某个目的队列,它仅仅是个定义,不真正占用磁盘存储空间。,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系统中最上层的一个概念,由它为我们提供基于队列的消息服务, 像一数据库实例一样 队列 通道 通道是MQ系统中队列管理器之间传递消息的管道,它是建立在物理的网络连接之上的一个逻辑概念。 通
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的通讯模式 点对点通讯 多点广播 发布/订阅(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 调用后停止。输入此命令后发出的任何 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 在发送方A: 定义本地传输队列: define qlocal (QMB) usage (xmitq) defpsist(y
11、es) 创建远程队列: define qremote (QR.TOB) rname (LQB) rqmname (QMB) xmitq (QMB) 定义发送通道: define channel (A.TO.B) chltype (sdr) conname (IP of B) xmitq (QMB) + trptype (tcp) 在接收方B: 定义本地队列QLB: define qlocal (LQB) 创建接收通道: 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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年数列基础测试题及答案
- 2026年公司对员工品德测试题及答案
- 2026校招:健康管理师面试题及答案
- 2026校招:华夏航空真题及答案
- 2026校招:国家农业信贷担保联盟真题及答案
- 2026年买房按揭合同(1篇)
- 2026校招:富邦控股集团面试题及答案
- 委托还款三方协议书模板
- 学生打架和解合同协议书模板
- 2026校招:鄂尔多斯投资集团试题及答案
- 节后复工安全教育培训 节后安全教育内容
- GB/T 35199-2017土方机械轮胎式装载机技术条件
- GB/T 14626-1993锻钢制螺纹管件
- 涉外婚姻、收养、继承、公证法律制度课件
- 教科版五年级科学下册【全册全套】课件
- 考研考博-英语-华东理工大学考试押题卷含答案详解1
- 孕前优生健康检查
- 临床心理学(第2版)电子课件
- 人教版一年级数学下册第一单元整理复习教案
- 五四制新青岛版五年级科学下册第六单元《生物与环境》全部课件(共3节)
- 组织学与胚胎学:软骨与骨
评论
0/150
提交评论