IBM Websphere MQ 基础2:Queue队列

概念

A queue is a container for messages. Business applications that are connected to the queue manager that hosts the queue can retrieve messages from the queue or can put messages on the queue. A queue has a limited capacity in terms of both the maximum number of messages that it can hold and the maximum length of those messages.

队列是消息的容器。连接到队列管理器的企业app能从队列中获取消息,也能发布消息至队列。队列有容量限制,也即:队列最大可容纳消息和消息最长长度均有限制。管理员可通过命令进行配置。

队列分类

Queue type

Description

Local queue

本地队列

A local queue is a definition of both a queue and the set of messages that are associated with the queue. The queue manager that hosts the queue receives messages in its local queues.本地队列是Queue和与queue相关联的消息统称,队列管理器通过本地队列接收/存放的消息

Transmission queue

传输队列

Transmission queues are a special type of local queue. When the queue manager sends a message to a queue on a remote queue manager, the transmission queue stores the message locally until the queue on the remote queue manager is available. To create a transmission queue, create a local queue and change its Usage attribute to Transmission. 传输队列是一种特殊的本地列队,用于将消息发送到远端QM的队列,在远端queue的消息能使用之前,本地传输队列必须保存此消息。创建传输queue需要把queueusage属性设置为Transmission

Remote queue definition

远端队列定义

Remote queue definitions are definitions on the local queue manager of queues that belong to another queue manager. To send a message to a queue on a remote queue manager, the sender queue manager must have a remote definition of the target queue.定义在本地QM的属于远端QM的队列,用于本地QM向远端QM发送消息。

Alias queue

队列别名

Alias queues are not actually queues; they are additional definitions of existing queues. You create alias queue definitions that refer to actual local queues but you can name the alias queue definition differently from the local queue (the base queue). This means that you can change the queues that an application uses without needing to change the application; you just create an alias queue definition that points to the new local queue.(顾名思义,alias queue是队列的一个别名。)

Model queue

模型队列

A model queue is a template for queues that you want the queue manager to create dynamically as required. When an application tries to put a message on a model queue, the queue manager dynamically creates a local queue with the same name as the model queue. Queues that are created in this way can either be temporary or permanent.model queue是一个队列模版,用于动态创建queue。创建的队列即可以是临时的,也可以是永久的)

Cluster queue

集群队列

A cluster queue is a queue that has been shared in a cluster so that all of the queue managers in the cluster can put and get from the queue using cluster channels. For more information, see Queue manager clusters. (集群队列,用于集群中所有QM通过集群通道cluster channel共享)

Shared queue

共享队列

z/OS® only. A shared queue is a queue that has the queue-sharing group disposition of Shared. All of the queue managers in the queue-sharing group can put and get from the queue without needing active channels. Only local queues can have the disposition of Shared. For more information, see Queue-sharing groups. share queue是一种具有share 队列共享组倾向的queue,在队列共享组中QM不需要激活channel就能get/put消息)

Group definition queue

组定义队列

z/OS only. A group queue is a queue that has the queue-sharing group disposition of Group. Each of the queue managers in the queue-sharing group has a copy of the queue (with the disposition Copy) stored on their own page set. Local, remote, alias, and model queues can have the disposition Group. For more information, see Queue-sharing groups. Group definition queue是一种具有share 队列共享组倾向的queue,在队列共享组中QM都有一个队列副本存储于其本地页面集?)

常用队列属性

MAXDEPTH

最大深度,允许的最大消息数

DEFPSIST

消息持久性(默认为非持久,QM重启后消息丢失)

MAXMSGL

输入队列中允许的最大消息长度(以字节计)。

DISTL

分发列表

其他属性请参阅IBM官网:

IBM MQ 属性

一个例子

1. 创建一个本地队列(TEST.QUEUE),深度为5000

2. 查看本地队列属性

IBM Websphere MQ 基础2:Queue队列_第1张图片

3. 扩展
display命令支持通配符*,用于查看所有本地队列。如:

DISPLAY QLOCAL(*)

 

你可能感兴趣的:(MQ)