Sei sulla pagina 1di 37

MQ Overview

What is MQ?

What is Message?

What IBM says about MQ?

What is MQ?

A member of websphere family from IBM. Websphere MQ
(formally MQseries) is the standard for messaging across
multiple platforms, including windows, linux, IBM mainframe
and midrange and Unix flavors.

A middleware product that implements a messaging and
queuing framework

Middleware - an intermediate software component that
bridges dissimilar computing environments.

A Brief History of MQ
1992
Systems Strategies (SSI) develops ezBridge, a messaging and
queuing product for VMS, Tandem, and Unix
IBM announces Networking Blueprint defining three standard APIs
for program to program communication: CPI-C, RPC, MQI

1992-3
State Street Bank (Boston) evaluates IBM messaging product
(code name Victory) for IBM CICS/ESA and SSIs ezBridge on
VMS and Tandem.
State Street Bank would like to announce the wedding of
IBM and Systems Strategies!
1993
IBM buys intellectual property rights for ezBridge from SSI

MQSeries Platform Rollout
Initially, IBMs version of MQSeries ran only on mainframe
(CICS/ESA, IMS/ESA, and eventually VSE).

SSI version (called MQSeries Version 1) initially released on:
VMS, Tandem, AS/400, and Unix (SCO, UnixWare).

1994/1995 -IBM releases the first three distributed platforms:
AIX, OS/2, and AS/400.
The AIX version becomes the reference port.

Over time, IBM replaced SSI versions with ports of its reference
system.

Today - MQ runs on over 80 platforms & support more and more
programming techniques.


MQ support to different program
models
Platforms

OS/390, zOS
AIX
Windows NT, 2000,
2003, XP, Vista
Solaris: Intel & SPARC
HP-UX
OS/400
OS/2
Compaq Open VMS
Compaq NSK
Compaq Tru64 UNIX
VSE/ESA
Digital UNIX
SunOS
Dynix/ptx
NCR
TPF
SCO: Openserver,
UnixWare
IRIX
DC/OSx
NUMA-Q
Sinix
Linux (Intel,
zSeries)
PalmOS (MQe)
EPOC (MQe)
Java (MQe)
Unisys 2000
Hitachi
How Messaging & Queuing Works
Programs communicate by putting
messages on queues. Here, program
A puts a message on Queue1, which
is read by program B.
Note: A and B need not be
on the same machine!
How Messaging & Queuing Works
(2)
Communication can be one-
way or two-way. Here, A
sends to B on Queue1, and B
responds to A on Queue2
Messaging and Queuing
Characteristics
Three key facts about Messaging and
Queuing differentiate it from other
communication styles:
1) Communicating programs can run at different times.
2) There are no constraints on application structure.
3) Programs are insulated from environmental differences.

Applications Can Run at Different
Times
Either program can
be unavailable
Key Concept:
message queue exists
independently from
programs that use them!
No Constraints on Application
Structure
There can be a one to many
relationship between
applications
Or a many to one
relationship between
applications
MQ Supports Client-server
architecture for applications
Applications Shielded from
Environmental Differences
Dont care what OS is used.
Dont care what language theyre
written in
Dont care what the underlying
communication protocol is used.
Applications Shielded from
Environmental Differences
Applications
Programmatic
API
Communications using
Message Channels
Queue Manager
Queue Manager
Message Queue
Supports synchronous/Asynchronous
communication
Synchronous: App sends request, then blocks until request is
processed.
Requires service available at EXACTLY same time as client
needs service.
Asynchronous: App sends request and checks at some future
time if complete.
Service need not be available when client sends request
MQ Supports Message driven Processing
Makes use of triggering concept to achieve it
Synchronous: good/bad
Easy to program
Outcome is known
immediately
Error recovery
easier (usually)
Better real-time
response (usually)

Service must be up
and ready
requestor blocks,
held resources are
tied up
Usually requires
connection-
oriented protocol

Good Bad
Requests need not
be targeted to
specific server.
Service need not be
available when
request is made
No blocking, so
resources could be
freed
Could use
connectionless
protocol

Response times are
unpredictable
error handling
usually more
complex
Harder to design
apps?

Good Bad
Asynchronous: good/bad
What is Message?
Its a representation of data to be exchanged between
applications.
It can be,
Binary
Text (Raw text, XML)
Structured data (C structures, Cobol copybooks,
Serialized Java Objects)
Swift messages
Anything!!
Types of messages
Datagram
Request
Reply
Report

Persistence
Non persistence
Request message contains name of the queue and
owning queue manager to which response should be
delivered.

Message parts
Message Descriptor (MQMD)
Message Body



MQMD
Expiry
Message ID
Correlation ID
Group ID
Message Sequence number
offset
Persistence
Priority
Reply to Queue/Queue manager
User identifier
Put Application name
Put date/time


MQ allowable message sizes
Increased with versions
MQ v5.X
MQ V6.X
Disadvantage of bigger Messages
Network bandwidth consumption
Processing of messages slows
Segmenting of messages
Grouping of messages

VERSIONS:- 5.0, 5.1, 5.3, 6.0,
7.0,7.5(Latest version). Currently
widely used version is 7.0
MQ Objects: - objects are used to handle the transactions with
the help of services.

QUEUE MANAGER maintains all the objects and services.

QUEUE: it is a database structure which stores messages until
the application or program receives messages

TYPES OF QUEUES:-
Local Queue
Alias Queue
Model Queue
Remote Queue
Repository Queue
Local Queue:-
A queue is local if it is owned by the queue manager to which the
application program is connected. It is used to store messages for
programs that use the same queue manager.

DEFINE QLOCAL(QUEUE NAME)
Remote Queue:-
The queue which holds the address of the remote queue manager
where the message has to be sent or delivered. It is a logical queue
where we cannot store the messages and get the
messages.

DEFINE QREMOTE(QUEUE NAME) XMITQ(TRANSMISSION QUEUE)
RQMNAME(REMOTE QUEUE MANAGER NAME) RNAME(REMOTE QUEUE
NAME)

Model Queue
A model queue is not a real queue. It is a collection of attributes that
are used when a dynamic
queue is created.

DEFINE QMODEL(QUEUE NAME) DEFTYPE(PERMDYN)


















Repository Queue:-
These are used in conjunction with clustering and hold either a full or a
partial repository of queue managers and queue manager objects in a
cluster (or group) of queue managers.

Alias Queue :-Alias queues are not real queues but they are
definitions. They are used to assign different names to the same
physical queue. Advantages of alias queue allow multiple programs to
work with the same queue but with different attributes or properties.

Example:
Alias for LQ with different parameters
DEFINE QALIAS (PQ) TARGQ (LQ) GET (DISABLED) PUT (ENABLED)
DEFINE QALIAS (PQ) TARGQ (LQ) PUT (ENABLED) GET (DISABLED)

TYPES OF LOCAL QUEUE:-
Dead letter Queue
Transmission Queue
Initiation Queue













Listener
Its a process which listens continuously
on to a queue manager port.
Default port 1414
Define listener(my.listener.12345)
trptype(tcp) port(12345)
MQI COMMANDS:-
MQI Commands are of three types.
CONTROL COMMANDS
SCRIPT COMMANDS
PCF (programmable command format) COMMANDS.




















CONTROL COMMANDS :-( case sensitive)
Dspmqver :-to display MQ version
Dspmq :- to view all queue managers of MQ.
Crtmqm :- to create a queue manager
Strmqm :- to start queue manager
Runmqsc :- to enter in to particular queue manager
Endmqm :- to end a queue manager
Dltmqm :- to delete a queue manager
Dspmqcsv :-to display command server
Endmqcsv :-to end command server
Strmqcsv :- to start command server
Runmqlsr :- to run listener service
Endmqlsr :- to end listener service
Runmqchl :-to run a channel out of queue manager
Runmqdlq :-to execute dead letter handle with the help of rule table
Setmqaut :-to set authorizations for particular objects like
queuemanager,queues channels,listeners to user or group.

Dspmqaut :-to display authorization for particular user

Dmpmqaut :-to dump authorization for particular user

Runmqchi :-to run a channel initiator for particular queue manager

Runmqtrm :-to run trigger monitor on initiation queue for particular
queue manager

Rcdmqimg :-to take objects (or) record image of a particular queue
manager objects

Rcrmqobj :-to recreate the mq objects which are already recorded
SCRIPT COMMANDS:-
After entering in to queue manager we can find script commands.
Script commands are same for every queue manager. (These
Commands should be used in CAPITAL LETTERS)
DEFINE :-To define/create MQ manager objects like queue,
Channels, process, and listener.













DISPLAY :-to view all the properties of a particular object or to
Display all objects
DELETE :-to delete created objects
CLEAR :-to clear the message from the queue
END :-to come out of the queue manager
PING :-to check whether other side channel / queue manager is
ready to accept our request.
START :- to start the particular channel or listener
STOP :-to stop particular channel or listener
REFRESH :-used to refresh the security every time after giving or
executing, set mgr or
command for queue manager or object
RESET :-used to reset channel,cluster,queue manager
RESOLVE :-to resolve the channel which is in indoubt state
SUSPEND :-to suspend a queue manager from a cluster
environment
RESUME :-to remove a queue manager from a cluster environment
WMQ Course content daywise (Message Queuing)

Day 1: introduction to EAI, ESB, WMQ and WMB
Role of MQ administrator.

Day2 :Installation WMQ software
Playing with Websphere MQ Explorer.

Day 3 :Point to point communication.

Day 4: Distributed Setup.(one to many, many to one & many to
many)

Day 5:Multihopping(gateway)

Day 6: Triggering (channel & Application)

Day 7:Logs (error logs & transmission logs)

Day 8:Cluster Setup ,Load Balancing.
















v
Day 9: Application of clustering

Day 10: WMQ Installation on Linux OS

Day 11: Security (object authority management)

Day 12: Backup & Restore ,Fixpack installation and migration

Day 13:Publish and Subscribe

Day 14:SSL (Secure Socket Layer)

Day 15:Dead letter Queue , Model queue ,Alias queue.

Day 16:Client Server Architecture

Day 17:SDLC ,Ticketing tools(remedy) ITIL process ,Monitoring tools

Day 18: Trouble shooting ,Interview Questions.

Day 19 to 25: Basic Unix/Linux commands

Potrebbero piacerti anche