intro on messaging and mqseries
TRANSCRIPT
-
7/30/2019 Intro on Messaging and MQSeries
1/25
IBM MQ SERIES
An Introduction to Messaging and MQSeries
-
7/30/2019 Intro on Messaging and MQSeries
2/25
Business Insights. Technology Leadership
Messaging and Queuing
Message queuing is a method of program-to program communication.
Messaging is the technique which two Programs/Humans/Objects uses to
communicate.
Here the two parties involved in messaging do not directly talk to each
other.
Queuing refers to two parties using queues to communicate with each other.
Asynchronous messagingSender doesnt wait for the reply, but continues to do his next task
Synchronous messagingSender waits for the reply from the receiver, before proceeding to his next task
-
7/30/2019 Intro on Messaging and MQSeries
3/25
Business Insights. Technology Leadership
Types of Messaging
Point to point messaging Publish/Subscribe messaging
Producer 1
Queue 2 Consumer 1
Producer 2
Queue 2 Consumer 2
Producer 3
Consumer 2
Producer 1
Producer 2
Consumer 1
Topic
-
7/30/2019 Intro on Messaging and MQSeries
4/25
Business Insights. Technology Leadership
Point to point messagingThe sending application/client establishes a named message queue in the
broker/server and sends messages to this queue.
The receiving client registers with the broker to receive messages posted to thisqueue.
There is a one-to-one relationship between the sending and receiving clients.
Supports look-ahead or primitive browsing operations on queues, without removing messages on thequeue
Point to Point Messaging
Producer 1
Queue 2 Consumer 1
Producer 2
Queue 2 Consumer 2
Producer 3
-
7/30/2019 Intro on Messaging and MQSeries
5/25
Business Insights. Technology Leadership
Publish/Subscribe messagingClients can produce messages for an unknown, and/or unlimited, number of subscribers; that is,
publish/subscribe messaging supports 1-to-n messaging operations.
Subscribing clients have the choice between durable and nondurable connections to the server.
Publish and Subscribe Messaging
Consumer 2
Producer 1
Producer 2
Consumer 1
Topic
-
7/30/2019 Intro on Messaging and MQSeries
6/25
Business Insights. Technology Leadership
Messaging products
MQSeriesMSMQ
BEA Tuxedo
JMS
-
7/30/2019 Intro on Messaging and MQSeries
7/25
Business Insights. Technology Leadership
MQSeries - for messaging services.MQSeries Integrator - for Business Integration.
MQSeries - For complete Work Flow Solution for an
organization.
MQSeries Everyplace - MQServer, which operates on low memory devices like
PDA. This MQServer will interact with base MQSeries server.
MQSeries Family
-
7/30/2019 Intro on Messaging and MQSeries
8/25
Business Insights. Technology Leadership
MQSeries Overview
MQSeries is a Middleware for Commercial messaging and queuingMQSeries is a communications system
It provides an assured, asynchronous, once-only delivery of data across a broad
range of hardware and software platforms
MQSeries provides transaction oriented store-and-forward messaging services with
assured delivery
MQSeries is available for a variety of software platforms (approx. 35 platforms
MVS,Windows NT, AIX, OS2, Linux, Palm OS / Windows CE.)
-
7/30/2019 Intro on Messaging and MQSeries
9/25
Business Insights. Technology Leadership
MQSeries Components
MQSeries supports client-server configurations for MQSeries applications and has components.
MQ Series Client (Slim client and Fat client)
MQSeries client accepts MQSeries calls from applications and pass them to an MQSeries server
machine.
MQ Series Server
MQSeries server is a queue manager that provides queuing services to one or more clients.
Note: All the MQSeries objects (for example, queues) exist only on the MQSeries server machine.
-
7/30/2019 Intro on Messaging and MQSeries
10/25
Business Insights. Technology Leadership
MQSeries Client and Server ConnectionConnection options
MQ Servers can be accessed by
Native MQ Clients which are MQ Clients installed on same platform to that of the MQServer.
Java clients, to communicate with an MQ Server, can use of MQ Series Classes for Java
Java clients can communicate with any MQServer in 2 different modes.
As an MQSeries Client using TCP/IP
In this mode, server will be listening at port 1414(default MQ port) and the client will
connect to the server over TCP/IP.
This is very useful when client and server are in different platforms and
communicating over TCP/IP network.
In bindings mode, directly connecting to MQ Series Server
In this mode, MQ Java uses the Java Native Interface (JNI) to call directly into the
existing queue manager API, rather than communicating through a network.This provides better performance for MQSeries applications than using network
connections.
-
7/30/2019 Intro on Messaging and MQSeries
11/25
Business Insights. Technology Leadership
MQSeries Objects
The MQSeries Objects -
Queue managers
Queues
Channels
Process definitions
Listeners
Queue-sharing groups(MQSeries for OS/390, V2.2 with sysplex only)
Namelists (MQSeries for OS/390 and MQSeries Version 5.1 products only)
Storage classes(MQSeries for OS/390 only)
-
7/30/2019 Intro on Messaging and MQSeries
12/25
Business Insights. Technology Leadership
MQSeries Objects - Queue Manager
Queue ManagerQueue manager is the program that provides messaging services to applications.
The queue manager ensures that messages are sent to the correct queue or are
routed to another queue manager.
The queue manager processes both the MQI calls that are issued to it, and the
commands that are submitted to it.
The queue manager generates the appropriate completion codes for each call orcommand.
Queue Manager manages everything under it.
-
7/30/2019 Intro on Messaging and MQSeries
13/25
Business Insights. Technology Leadership
MQSeries Objects - Queues
MQSeries Queues
Queue is a MQSeries Object.
A Queue is a container for messages.
A Message queue is owned and maintained by a queue manager.
Prerequisites
Even before creating a queue, a queue managermust have been created and must be running, and its
command server must be running.
-
7/30/2019 Intro on Messaging and MQSeries
14/25
Business Insights. Technology Leadership
MQSeries Objects -Queues
Queues are the objects of queue manager for storing messages.Types of QueuesLocal Queue
Remote Queue & Remote Queue Definition
Transmission Queue
Dynamic Queue
Alias Queue
Model Queue
Reply to QueueDead Letter Queue
Cluster Queue
Repository Queue
Initiation queues
System command queue & System default queues
Channel queues & Event queues
-
7/30/2019 Intro on Messaging and MQSeries
15/25
Business Insights. Technology Leadership
MQSeries Objects - Channels
Two types of ChannelsMQI Channel
A communication channel connecting MQS Client to a Queue Manager in its MQS Server m/c.
- Client Connection Channel - Server Connection Channel
Message Channel
A communication channel between Client and Server.
- Sending Channel - Receiver Channel
A message channel connects two queue managers via message channel agents (MCA's).
Channels for Clusters- Cluster Sending Channel - Cluster Receiver Channel
Other Channels-Requester Channel - Server Channel
-
7/30/2019 Intro on Messaging and MQSeries
16/25
Business Insights. Technology Leadership
MQSeries Objects - Channels
Defining MQI ChannelsAutomatically defined channels
- SYSTEM.AUTO.RECEIVER - SYSTEM.AUTO.SVRCONN
User defined channelsThere are two ways of creating the channel definitions and giving the MQSeries application on the
MQSeries client machine access to the channel.
-Create one channel definition on the MQSeries client and the other on the server.
-Create both channel definitions on the server machine
-
7/30/2019 Intro on Messaging and MQSeries
17/25
Business Insights. Technology Leadership
MQSeries Objects - Process Definitions
Process DefinitionA Process Definition object defines an application to the Queue Manager.
This Definition should contain the name of the program and its path to be triggered when a
message arrives on it.
Example.
On WinNT Environment.
A .bat file to be triggered.
On Aix Environment.A Batch program to be triggered.
On OS390 Environment.
A CICS Transaction to be triggered.
-
7/30/2019 Intro on Messaging and MQSeries
18/25
Business Insights. Technology Leadership
MQSeries Objects - Listener
ListenerA Listener is a program which listens on the receiving channel for incoming
messages.
The default port no on which the Listener listens on is 1414.
-
7/30/2019 Intro on Messaging and MQSeries
19/25
Business Insights. Technology Leadership
MQSeries Objects - Listener
Trigger MonitorsTrigger Monitor an program or application which servers initiation queues
It is a continuously running program which keeps monitoring initiation queues.
-
7/30/2019 Intro on Messaging and MQSeries
20/25
Business Insights. Technology Leadership
MQSeries Objects - Message Channel Agents
Message Channel Agents (MCA)A message channel agent is a program which control sending and receiving of
messages
There is one message channel agent at each end of a channel.
One MCA takes messages from the transmission queue and puts them on the
communication link.
The other MCA receives messages and delivers them onto a queue on the remotequeue manager.
A message channel agent is called a caller MCA if it initiated the communication,
otherwise it is called a responder MCA.
.
-
7/30/2019 Intro on Messaging and MQSeries
21/25
Business Insights. Technology Leadership
MQSeries Messages
Limitations on the length of MQ Message.
A MQ Message can be up to 4 MB or 100 MB long, depending on the MQSeries version youuse.
MQSeries Version 5 (for distributed platforms) supports a maximum message length of 100 MB.
MQS Messages Components-
Application Data
Message Descriptor
Application DataThe Application using the message defines the content of the message and its structure.
Message Descriptor
The message descriptor identifies the message and contains other control information.
B i I i h T h l L d hi
-
7/30/2019 Intro on Messaging and MQSeries
22/25
Business Insights. Technology Leadership
MQSeries Messages
Message Descriptor
Version Return Address
Message ID / Correlation ID Format
Persistent / non-persistent Sender application and Type
Priority Report options / Feedback (COA, COD)
Date and Time Backout counter Lifetime of a message Segmenting / Grouping information
B i I i ht T h l L d hi
-
7/30/2019 Intro on Messaging and MQSeries
23/25
Business Insights. Technology Leadership
MQSeries Messages
Message Segmenting and Grouping
Distribution Lists
B i I i ht T h l L d hi
-
7/30/2019 Intro on Messaging and MQSeries
24/25
Business Insights. Technology Leadership
Message
A Message is a communication sent between programs
Message Types
Datagram
Request
Reply
Report
MQSeries Messages
Business Insights Technology Leadership
-
7/30/2019 Intro on Messaging and MQSeries
25/25
Business Insights. Technology Leadership
MQSeries - Guidelines
Guidelines for creating queue managers
Specify a unique queue manager nameLimit the number of queue managers ( There is actually no limit )
Specify a default queue manager
Specify a dead-letter queue
Specify a default transmission queue
Specify the logging parameters you require