IBM WebSphere MQ Related concepts

Source: Internet
Author: User
Tags message queue

IBM WebSphere MQ Basic Concepts

Basic concepts

1. Queue Manager

The queue Manager, as its name implies, is the management of Message Queuing, which ensures that messages in the queue are sent to the correct receive queue, or that messages are delivered to another queue manager. The Queue Manager generates the appropriate completion code for each invocation or command.

The tasks that the Queue Manager performs are:

    • Start Channel
    • Handling MQI Calls
    • Create, delete, or change queue and channel definitions
    • Run the command server to process the MQSC command

2. MQ Message Queuing

Knowledge from the data structure knows that the queue is a queuing and is a linear container. MQ (Message Queue) is the container in which messages are stored. The main thing to do in programming is to put messages in the queue or retrieve useful messages from the queue.

Classification of queues

Queue Type Description
Local queues A local queue is a definition of a queue and a set of messages associated with this queue. The queue manager of the supervisor queue receives messages in its local queue.
Transmission queue The transport queue is a special type of local queue. When a queue manager sends a message to a queue on a remote queue manager, the transport queue stores this message locally until the queue on the remote Queue Manager is available. To create a transport queue, create a local queue and change its usage properties to “传输” .
Remote Queue definition The remote queue definition is defined on the local queue manager that belongs to the queue of 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 destination queue.
Alias queue Alias queues are not actually queues; they are additional definitions of existing queues. You create an alias queue definition that points to the actual local queue, but you can name the alias queue definition with a different names than the local queue (the base queue). This means that you can change the queue that your application uses without changing the application, and you only need to create an alias queue definition that points to the new local queue.
Model queue A model queue is a template for a queue that you want the queue manager to dynamically create as needed. When an application attempts to place a message into a model queue, the queue manager dynamically creates a local queue with the same name as this model queue. A queue created in this manner can be either a temporary queue or a permanent queue.
Cluster queue A cluster queue is a queue that has been shared in a cluster, so that all queue managers in this cluster can use the cluster channel to place and get messages in this queue.
Shared queues Applies to z/os® only. A Shared Queue is a 共享 queue owned by a queue share group disposition. All queue managers in a queue sharing group can place and get messages in this queue without the active channel. Only local queues can have a 共享 disposition.
Group definition Queue Applies to Z/Os only. The teaming column is the queue that owns 组 the queue share group disposition. Each queue manager in a queue sharing group has a copy of that queue (owning 副本 disposition) stored in its own set of pages. Local queues, remote queues, alias queues, and model queues can have a 组 disposition.

3. Theme

Topics are used to identify the content of a publication. That is, depending on the subject, you can know what is being sent. As with the article, according to the title of the article, I know what the article said.

A topic is a string that describes the title of a message. As a subscriber, you can use wildcards to specify topics to find the messages you want.

The length of the theme is composed of a string of up to 10,240 characters long.

The topic is the key to successfully delivering messages in a publish/subscribe system. Instead of including a specific destination address in each message, the Publisher assigns a topic to each message. The Queue Manager matches the topic to a group of subscribers who have already booked the topic, and delivers the message to each of these subscribers.

If we take the subject as a category, we understand it: The message is understood as a newspaper subscription, or a subscription to a consultation. We launched the "Today's headline" And there are a number of categories to choose from: "Recommendations", "hotspots", "regions", "social", "World Cup", "entertainment", "technology", "Cars", "Sports", "finance", "Military", "International", "Satin", "funny", "digital", "Beauty", "Beauty" .... These are the categories (topics) of the consultation (message).

Subscribers set the subject of the subscription. If this information is available in the message queue, it will be pushed to the phone. Message push will only push you to subscribe to the topic, no subscription theme, is not pushed to you.

    • The subject string can contain any character in the Unicode character set, including the space character. However, some characters have special meanings. These characters are described in the wildcard scheme in the online IBM® websphere®mq Information Center: a plus (+), pound sign (#), asterisk (*), and question mark (?).
    • Subject strings are case sensitive, although null characters do not cause errors, but do not use null characters in the subject string. For up-to-date information about subject strings, see Using topic strings in the online IBM WebSphere MQ Information Center.

4. Cluster theme

For the cluster is not known, back up.

5. Reservation

A reservation is a record that contains information about the subject that the Subscriber is interested in and wants to receive information about. Therefore, the booking information determines which publications are forwarded to subscribers. Subscribers can receive information from different publishers, and they can also send the information they receive to other subscribers.

The published information is sent in the WEBSPHERE®MQ message, and the subject of the information is identified by a subject. The publisher specifies the subject when publishing the information, while the Subscriber specifies the topic to which the publication is to be received. Only the subscribers will be sent information about the topics for which they are booking.

If you understand the subject above, it is easy to understand.

The WebSphere MQ V7 Queue Manager uses the publish / Subscribe engine to control the interaction between publishers and Subscribers. The Publish/Subscribe engine receives messages from publishers and subscription requests from subscribers (for subject areas). The job of the publish/subscribe engine is to pass the published data to the target subscribers.

Transmission path of the message:

Publisher--publish/book engine--subscribers

6. Release

A publication is a message sent by an application to the Publish/subscribe engine. The Publish/Subscribe engine then sends messages to any applications that have been booked to receive these messages. The Publish/Subscribe engine handles the publications it receives differently based on the type of information it contains in the publication.

Publication type: Status Publishing, Event publishing.

Status release
A
status release contains information about the current state of an event, such as the stock price or the current score of a football match. When something happens (such as a stock price change or a football score change), the previous status information is no longer needed because it is replaced with new information.
The Subscriber application wants to receive the current version of the status information at startup and wants to receive new information when the state changes.
Event Publishing
An
event publication contains information about the individual events that occurred, such as buying a stock or shooting a ball into a specific goal. Each event is independent of other events.
The subscriber wants to receive information about the event when it occurs.
7. Channel

WebSphere MQ provides two channels, similar to a network channel (single-channel, full-channel)

Message Channel : This is a one-way channel. It is a one-way communication link between two queue managers.

WebSphere uses a message channel to deliver messages directly in the queue. If you want to communicate in both directions, set up two channels. For example, two pairs of managers: Qm_a and Qm_b, a single channel may be qm_a send a message to Qm_b, cannot be qm_b send a message. For example, when the consultation is received: only the RSS server will send the inquiry (message) to the user. The user cannot consult (send) the message to the RSS server. This is the most common case of a message channel.

If you want to implement Qm_a-->qm_b and qm_b-->qm_a, then you need to establish two channels between queue management.

Type of message Channel definition:

The message channel contains both ends of the channel.

The message Channel definition is just one end of the channel.

message Channel Definition type Description
Sending party The sender channel is the message channel that the queue Manager uses to send messages to other queue managers. To send a message using the sender channel, you must also create a receiver channel with the same name as this sender channel on another queue manager. If you are implementing a callback mechanism, you can also use the sender channel with the requester channel.
Server A server channel is a message channel that the queue Manager uses to send messages to other queue managers. To use a server channel to send messages, you must also create a receiver channel with the same name as this server channel on another queue manager. You can also use the server channel with the requester channel. In this situation, the requester channel at the other end of the channel defines the server channel definition that the request is to start. The server sends the message to the requester. It can also initiate communication as long as the server knows the connection name of the other channel.
Receiving party The receiver channel is the message channel that the queue Manager uses to receive messages from other queue managers. To receive a message using the receiver channel, you must also create a sender channel or server channel with the same name as this receiver channel on another queue manager.
Requesting party The requester channel is the message channel that the queue Manager uses to send messages to other queue managers. To send a message using a requester channel, you must also create a sender channel on another queue manager (if you are implementing a callback mechanism) or a server channel.
Cluster sender The cluster sender (CLUSSDR) channel definition is used to define the channel send side through which the cluster Queue Manager can send cluster information to one of the full repositories. The cluster sender channel is used to inform the repository of any changes to the status of the queue manager, such as adding or removing queues. It is also used to transmit messages. The full Repository Queue Manager itself has a cluster sender channel pointing to each other. They use these channels to communicate with each other about changes in the cluster state. It is not important for the queue manager's CLUSSDR Channel definition to point to which full repository. After the initial contact, additional cluster Queue Manager objects are automatically defined as needed so that the queue Manager can send the cluster information to each full repository and send the message to each queue manager.
The cluster receiving party The cluster receiver (CLUSRCVR) channel definition is used to define the channel receiving end, which the cluster Queue Manager can use to receive messages from other queue managers in the cluster. The cluster receiver channel also transmits information about the cluster-information sent to the repository. By defining a cluster receiver channel, the queue Manager indicates to other cluster queue managers that it can be used to receive messages. Each cluster queue Manager requires at least one cluster receiver channel.

MQI Channel : It is a bidirectional channel used to connect an application (MQI client) to a queue manager on the server. WebSphere MQ uses the MQI channel to transfer MQI calls and responses between the MQI client and the queue Manager.

You can use a combination of the following channel definitions:

    • Sender-Receiver
    • Server-Receiver
    • Requester-Server
    • Requester-Sender (callback)
    • Cluster Sender-Cluster receiver
8. Listener

Each listener object in the WebSphere MQ Resource Manager represents a listener process, but if you start the listener process from the command line, this listener cannot be represented by the listener object in the WebSphere MQ resource Manager. Therefore, to manage the listener process from the WebSphere MQ Resource Manager, create a listener object in WebSphere MQ Explorer. When you start a listener object in WebSphere MQ Explorer, the listener process also starts.

MQI Channel Type Description
Server connection The server connection channel is a bidirectional MQI channel that connects the WebSphere MQ client to the WebSphere MQ server. The server connection channel is the server side of the channel.
Client Connection The Client connection channel is a bidirectional MQI channel that connects the WebSphere MQ client to the WebSphere MQ server. WebSphere MQ Explorer also uses a client connection to connect to the remote Queue Manager. The Client connection channel is the client side of the channel. When you create a client connection channel, a file is created on the computer that is responsible for the queue manager. Then, you must copy the client connection file to the WebSphere MQ client computer.

9, Communication information Object Comminfo

WEBSPHERE®MQ Multicast provides low latency, high fan-out, and reliable multicast message delivery.

To use multicast transmission, you need to configure the Communication Information Object (COMMINFO).

Multi-point broadcast for WebSphere Introduction:

Multipoint broadcasts are more efficient than traditional unicast/subscription messaging because they can scale to a larger number of subscribers without adversely impacting performance. WebSphere MQ uses answer, negation, and sequence numbers to support reliable multicast message delivery for high-fanout low latency messaging.

WebSphere MQ Multicast Fair delivery supports almost simultaneous delivery, ensuring that no receivers are biased. Because WebSphere MQ multicast uses the network to deliver messages, there is no need for the publish/subscribe engine to fan out the data. After you map a topic to a group address, you do not need a queue manager because publishers and subscribers can operate in a peer-to-peer manner. This process allows you to reduce the load on the Queue Manager server, and the Queue Manager server will no longer be a potential point of failure.

    • LU6.2
    • Tcp / ip
    • NetBIOS
    • Spx

10. Queue Sharing Group

A queue sharing group is a set of queue managers that can access the same Shared queue. Each member of a queue sharing group has access to the same set of shared queues.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.