You are on page 1of 17

c    

  p

 
: -It is an IBM web sphere product which is evolved in 1990¶s.p

MQ series does transportation from one point to other.p

It is an EAI tool (Middle ware)p

½ :-5.0, 5.1, 5.3, 6.0, 7.0(new version).p

ahe currently using version is 6.2p

 : - MQ series supports more than 35+ operating systems. It is platform p

Independent. For every OS we have different MQ series software¶s. But the functionality of MQ seriesp

Default path for installing MQ series is:-p

ÿ  
 
 p

ÿ  
c 
  p

After installation it will create a group and user.p

Some middleware technologies are aibco, SAP XI.p

MQ series deals with two things, they are OBJECaS, SERVICES.p

In OBJECaS we havep

up  p
up ÿ p
up Dÿ p
up   ÿp
up    p

In SERVICES we have LISaENERS.p

! 
: - objects are used to handle the transactions with the help of services.p

   maintains all the objects and services.p

 : - it is a database structure which stores messages until the application or program receives
messages.p

D " :-p

·   p
·  
  p

· #   p

·     p

·  
$  p

  p

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. For Example, program A
and program B each has a queue for incoming messages and another queue for outgoing messages.
Since the queue manager serves both programs, all four queues are local.p

 Both programs do not have to run in the same workstation. Client workstations usually use a
queue manager in a server machine.p

     :-ahe queue which holds the address of the remote queue manager where the
message has to be sent or delivered.p

It is a logical queue where we cannot store the messages and get the messages.p

* ao send the messages we use only Remote Queue, none other than this*p

´   %  &'


' %  &ÿ'' & ()   *  '' & %  


+ '$ 

 (    ,´p

ÿ  àChannel (123.456)àchannel name.p

ÿD +) àsender channelp

DD +ÿD, àaransport type using aCP protocolp

ÿ (127.0.0.1)(1414)àthe channel will connect to the IP address specified in the conn name
and looks for the queue manager which is having listener, port number(1414) and connects to the
queue manager.p

XMIaQ (aQ)àthe channel will receive the messages from transmission queue manager.p

  :-Alias queues are not real queues but they are definitions. ahey are used to assign
different names to the same physical queue.p

Advantages of alias queue allow multiple programs to work with the same queue but with different
attributes or properties.p

DD-p
Dp
DD.p
p
p

In PQ get condition is disabled and in GQ put condition is disabled.p

DEFINE QALIAS (PQ) aARGQ (LQ) GEa (DISABLED) PUa (ENABLED)p

DEFINE QALIAS (PQ) aARGQ (LQ) PUa (ENABLED) GEa (DISABLED)p

DEFINE QLOCAL (LQ)p

  :-p

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

 
$  p

Repository queues have existed since Version 5.1 and Version 2.1 for OS/390. ahey 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.p

D "ÿ :-p

·  #    p

· '


'  p

· '   '  p

·   p

    : - the enrooted (or) undelivered messages will be landed in to the dead letter
queue.p

We have one control command called '%#%.It is a control command which is used to route the
messages through  table.p

ahis is called dead letter handler. It is important that we need a dead letter queue defined for every
queue manager.p

 p

For one Queue manager we can¶t have two dead letter queuesp

We have system defined objects called         p

Or we can use our own dead letter queue. ahe messages those are landed in the dead letter header
(DLH).p
By seeing the dead letter header, we can find the reason and the destination.p

   :-p

$'/  DESaQ(DLQ) DESaQM(222) REASON(*) WAIa(NO) FWDQ(LQ) FWDQM(222) HEADER(NO)p

'%#% -rule table pathp

  :-aQ will receive messages from Remote queue and hits or sends the
messages to the channel.p

ÿ :-It is a Networked program to transmit or pas the messages over the network.p

Channel will receive the messages from [ which is defined in the definition of the channel.
aransmission queue is also a local queue.p

D "ÿ :-p

· 

 '' 
p

· ÿ'' 
p

  ÿ :-Message channels are one way piping channels. ahey are used for sending or
receiving the messages.p

Message channels are unidirectional.p

D "  ÿ :-p

·  '# ÿ'' +)p

·   * ÿ'' +ÿ½,p

·  * ÿ'' +½,p

·  %
 ÿ'' +,p

· ÿ
  '# ÿ'' +ÿ ,p

· ÿ
   * ÿ'' +ÿ ÿ½,p

 ÿ :-ahese channels are two way piping channels which can send and receive the
messages in both ways.p

D :- p

·  * ÿ''  'ÿ'' +½ÿ,p

· ÿ 'ÿ''  'ÿ'' +ÿÿ)p


ÿ"ÿ :-p

·  '# '#  * p

·  * '# %
 p

· ÿ
 
'# '#ÿ
   * p

·  *   * p

·  '#  %
 p

  :-p

up It is a service of MQ seriesp
up Every Queue Manager will have a listener defined with a unique port number.p
up (Default port number is:-1414)p
up Listener acts as a mediator between external application or queue managers connecting to the
queue manager.p
up ao contact the queue manager we should approach through Listener.p

ÿ:-p

MQI Commands are of three types.p

· ÿÿp

· ÿDÿp

· Dÿ" (programmable command format) ÿ p

ÿÿ case sensitive)p

· 
%*  :-to display MQ series versionp

· 
%:-to view all queue managers of MQ series.p

· ÿ% :-to create a queue managerp

· % :-to start queue managerp

· '%
 :-to enter in to particular queue managerp

· '#%:-to end a queue managerp

· %:-to delete a queue managerp

· 
%
* :-to display command serverp
· '#%
*:-to end command serverp

· %
* :-to start command serverp

· '%
 :-to run listener servicep

· '#%
:-to end listener servicep

· '%:-to run a channel out of queue managerp

· '%#% :-to execute dead letter handle with the help of rule tablep

·  % :-to set authorizations for particular objects like queuemanager,queue¶s


channels, listeners to user or groupp

· 
% :-to display authorization for particular userp

· % -to dump authorization for particular userp

· '% :-to run a channel initiator for particular queue managerp

· '% :-to run trigger monitor on initiation queue for particular queue managerp

· #%  :-to take objects (or) record image of a particular queue manager objectsp

· %!:-to recreate the mq objects which are already recordedp

·   :-sp

ÿDÿ:-p

After entering in to queue manager we can find script commands.p

Script commands are same for every queue manager.p

(ahese Commands should be used in CAPIaAL LEaaERS)p

·  " :-ao define/create MQ manager objects like queue, p

Channels, process, and listener.p

·  :-to update or modify the existing objectsp

· D:-to view all the properties of a particular object or top

Display all objectsp

·   :-to delete created objectsp


· ÿ  :-to clear the message from the queuep

· :-to come out of the queue managerp

· D :-to check whether other side channel / queue manager is ready to accept our
request.p

·  :- to start the particular channel or listenerp

· D :-to stop particular channel or listenerp

·  " :-used to refresh the security every time after giving or executing, set mgr or
command for queue manager or objectp

·    :-used to reset channel,cluster,queue managerp

·  ½ :-to resolve the channel which is in indoubt statep

·  D  :-to suspend a queue manager from a cluster environmentp

·   :-to remove a queue manager from a cluster environmentp

ÿ  : - Channel states are of 5 typesp

up '' 'p
up ' * p
up  $ 'p
up  #p
up D
#+  * '' ,p

-  : - before going to Running state the status will be initialization and bindingp

Initialization:-channel will initiate the listenerp

Binding:-sender channel binds with receiver, after that it p

Goes to running state p

. ÿ½ :-we have one attribute called disconnect interval +ÿ) with 6000 milli seconds
(default) and it can be changed as of our convenience. If the channel is idle for a particular period
defined in disconnect interval, the channel will go to inactive state.p

   :-the channel goes to retrying state if the other side queue manager will not be
available, network issue, may be listener not running, may be receiver channel is in pause state, and
may be the receiver channel transportation type is different«. Etc. p

â D    :- this state is applicable for receiver (RCVR) channel. Paused state occurs when
the receiving queue is full.p
 p

1. If we do any changes to the channels, listeners, queue manager, to effect the


changes we need to stop and then start them.p

2. Before starting a channel listener should be in active / running, we can check by


pinging the channel.p

3. Ping is used to check whether the receiver is in active state or not.p

$'/ - PING CHANNEL (CHANNEL NAME)p

 DD gate way) p

Passing the messages between more than one intermediate queue managers is called Multi-Hopping.p

 p

For every queue, except remote queue we have two properties.p

1. open input count ( Iproess )p

2. open output count ( Oprocss )p

3. the application which is connected and putting the messages is called ³ O process ³p

4. ahe application which is processing(getting) the messages is calles ³ I procss ³p

Dÿ   ÿ   DD:-p

1. Create a queue manager QM1, QM2, QM3.p

2. Start the queue managers QM1,p

Create a remote queue with attributes local queue name (Remote Queue Manager) i.e Rname QM3 in
RQMname and the transmission queue called XMIaQ (aQ).p

3. Create a transmission queue called (aQ)p

4. Create a sender channel from (QM1.QM2)p

5. In Qm2 createp

Create a receiver channel (QM1.QM2)p

6. Create a transmission queue with name target queue manager name called QM3.p

7. Create a sender channel from (QM2.QM3) with transmission queue called XMIaQ (QM3)p
m. In QM3 create a local queue called (LQ) which is defined in remote queue of QM1 Rqueue(QM1)p

9. Create a receiver channel (QM2.QM3)p

We should have two listeners in QM2 and QM3. p

   ÿÿ   ÿ :-p

- %. 01 ' '*  p

. %. 02 ' '  p

 %. 20 ')'('! ' p

â %. 0  3 #p

0 %.  

 *  p

(mqrc²mq reason code) p

 :-p

1.ahis is an automated event driven by MQ seriesp

2.ariggering is an event which occurs when specific conditions are met on a queue p

3.ariggering are of two types p

1. ÿ  p

2. DDÿ p

ÿ   : - channel triggering is an event which fires the channel when ever a
certain conditions are met on transmission queue.p

Disconnect Interval of a Channel :-It is an attribute or property of the channel(DISCINa).if the


channel is idle for particular interval of time the channel will go to inactive state.(default time is
6000 milli seconds)p

 ÿ:-p

· arigger ON p

· arigger type(first(t.type),every, depth)p

· arigger data(channel name which is to be fired)p

· Initiation queue(SYSaEM.CHANNEL.INIaQ)p
''#:-p

DEFINE QLOCAL (aQ) USAGE (XMIaQ) aRIGGERaYPE (FIRSa) aRIGDAaA (111.222) INIaQ
(SYSaEM.CHANNEL.INIaQ)p

ao make changes use alter commandp

ALaER QLOCAL (aQ) aRIGGER aRIGaYPE (FIRSa) aRIGDAaA (111.222) INIaQ


(SYSaEM.CHANNEL.INIaQ)p

If we want to remove the trigger condition put NO before trigger condition.p

ÿ  Dÿ :-p

After giving specific conditions to a transmission queue, whenever the messages comes to the
transmission queue, the queue manager will look at the queue, if it is triggered the queue manager
will fire a trigger message in to initiation queue(  ÿ  ) with the information
called trigger type, trigger data, the channel which is to be fired.p

At the initiation queue (  ÿ  ) channel initiator will be watching (monitoring)
the initiation queue.p

When ever the trigger message comes to initiation queue, the channel initiator will read the
information and initiates the sender MCA (message channel agent).the sender message channel agent
will start the channel (which is mentioned in the trigger data).p

 :-ÿ (message channel agent) is a program which is defined automatically whenever a queue
manager is created.p

We have two types of MCA p

·   ÿ+ÿ,p

·  ÿ ½ ÿ+ÿ½ÿ,p

ÿ  :-It is a process running on a queue manager when queue manager is in


running state. For every queue manager there will only one channel initiatorp

 :- 1.In MQseries 5.3 we have to run this channel initiator as a separate process for every queue
manager.p

2.If we use ³&´ any process will run at background. this applicable for all.p

$'/:- runmqchi ±m Qmanagername ±q initq.p

/ :- runmqchi ±m QM1 ±q SYSaEM.CHANNEL.INIaQp

ao run channel initiator for queue manager QM1.p


In solaris / unix /linux /AIX we run the channel initiator as follows.p

Runmqchi ±m QM1 ±q SYSaEM.CHANNEL.INIaQ &p

DDÿ  :-when ever specific conditions met on a local queue application
triggering works.p

aRIGGER CONDIaION:-p

· arigger ONp

· arigger type(first, every(t.type),depth)p

· Initiation queue(our own defined local queue)p

· Processp

DEFINE QLOCAL (LQ) aRIGGER aRIGaYPE (EVERY) INIaQ (IQ) PROCESS (NOaEPAD).p

DEFINE PROCESS (NOaEPAD) APPLICID (NOaEPAD.EXE) APPLaYPE (WINDOWS)p

Runmqtrm ±m QM1 ±q IQp

ÿ Dÿ :-p

1. When ever the message comes to triggered local queue, queue manager will fire trigger message
with information called trigger type and the process definition (application which is to be triggered) in
to the initiation queue (IQ) (our own queue).p

2. At the initiation queue a long running time program called trigger monitor will be watching
(monitoring) the initiation queue.p

3. Whenever the trigger message occurs in the initiation the trigger monitor will pick the information
and starts the application which is defined in the process.p

DEFINE PROCESS (NOaEPAD) APPLICID (NOaEPAD.EXE) APPLYaYPE (WINDOWS Na)p

ÿ ½ :-it is a background process for queue manager when the queue manager starts
command server will be running (default)p

Note: - we have one attribute (ÿ ½) and we have two options in thatp

- p

.  p

By default the queue manager command server will be under control of (QMGR)p

If we change the SCMDSERV attribute to manual then we need to start command server manually.p
ÿÿ"ÿ ½ :-p

· 
%
*p

· %
*p

· '#%
*p

1.
%
*: - to display the command server for particular queue managerp

$'/ -dspmqcsv qmgrnamep

E.g.:- Dspmqcsv QM1.qmgrp

2.%
*:-to start the command server for a particular queue managerp

$'/:-strmqcsv ±a qmgrnamep

Eg:-strmqcsv Qm1p

3. '#%
*:-to end the command server for a particular queue managerp

$'/:-endmqcsv ±c ±I qmgrnamep

Eg :- endmqcsv ±I QM1(queue manager)p

-c à stops the command in a controlled manner.p

-I à stop the command immediately.p

  " ÿ  ½ :- ahe command server will allow commands to execute on a queue
manager usingp

(SYSaEM.ADMIN.COMMAND QUEUE)p

When the command server is stopped the commands, the commands will be stored in the command
queue called p

(SYSaEM.ADMIN.COMMAND QUEUE)p

After command server comes up the commands would be executed those are in the command queue.p

 4:- MQseries provides authorizations(permissions) for the users in two levelsp

1. Qmanager levelp

2. Object levelp
:- ahis group is automatically created by MQseries after installation. It also creates one
user (MUSR_MQADMIN)p

ahe users should belong to MQM group so that they can have all the permissions to administer MQ
series.p

ÿ  4:-p

 %:- this command is used to set the authorizations.p

$'/:- setmqaut[-m qmgrname] [-n objname] ±t objtype [-p principal /-g group] [-s service
component ] p


% :-to display the authorizations which are set to the queue manager.p

$'/ dspmqaut[-M qmgrname] [-n objname ] ±t objtype [-p principal/ -g group ] [-s service
component]p

Dspmqaut ±m QM1 ±t qmgr ±p XX(new user)p

ahe entity XX have the following authorizations for object QM1p

· Inqp

· Connectp

· Altusrp

· Crtp

· Dltp

· Chgp

· Dspp

· Setidp

· Setallp

!  *  p

$'/ p

Setmqaut ±m QM1 ±n LQ ±t queue ±pXX +putp

Dspmqaut ±m QM1 ±n LQ ±t queue ±p XXp

ahe setmqaut command completed successfullyp


Semqaut ±m QM1 ±n(20.30) ±t channel ±pXX +allmqip

Runmqsc QM1p

Starting MQSC for queue manager 1p

up REFRESH CLUSaERp
up REFRESH SECURIaY(generally we refresh security)p


: web sphere security cache refreshedp

    p

:- MQseries have two types of logsp

- p

. p

 :-the transactions like messages inbound(incoming) and outbound(outgoing)


objects creation, permissions etc. are going to be written to the transaction logs for every queue
managerp

Default path for log files in Windows:- p

[ c:\programfiles\IBM\websphere MQ\log\QMGR(QM1)\active directory\log files ]p

Default path for log files in LINUX, UNIX, SOLARIS, AIX (other than windows):-p

[ $/var/MQM/log/Qm1/active/logfiles ]p

'


'
 ($
:-p

- ÿÿ p

.  p

 : - In linear logs we can recover objects which are damaged and we can take backup
and clear the transactions.p

By using linear logs we can restart, recover and Image backup. In this we need some administrative
tasks to monitor the logs and to clear the logs.p

ÿ ÿD:-It is nothing but creation of objects, which are stored as a transaction and are stored
at Checkpoint (objects are LQ, aQ, and Channel«etc)p

Creation of queue manager in linear logging:-p

$'/:-p
Crtmqm ±LL ±Lf 204m ±Lp 10 ±LS 1 QM2p

up Lqàto create a queue manager in linear loggingp


up Lf àto specify the log file sizep
up Lpàto specify the number of log primariesp
up Lsàto specify the number of secondary logsp

 :-1. In transaction logs we have log primary and log secondary.p

2. We can view log primary files but we cannot view log secondary p

Files.p

3. By default queue manager will take ±Lp as 3 and ±Ls as 2.p

4. We can define log primary files maximum up to 250 files and log p

Secondary files maximum up to 254 files.p

Log primary files maximum²250p

Log secondary files maximum²254p

Creation of image backup by using linear logs:p

$'/:- rcdmqimgp

Rcdmqimg[-z] [-L] [-m Qmgrname ] ±t objtype[generic object name]p

Rcdmqimg ±m Qm1 ±t queue LQp

ao recover or recreate:-p

Rcrmqobjà this command is used to recover the objects.p

Syntax:-rcrmqobj[-z] [-m Qmgrname] ±t objtype[generic objname]p

Eg:- rcrmqobj ±m Qm1 ±t q LQp

:-p

ahe operations going on(running) on MQ series will be written to errorlogs.p

We have two types of error logs,p

1.MQseries levelp

2.Queue manager level errorsp


   '   *  
:-the operations and errors are written to the queue manager error
folder.p

Default path for windows :p

[ c:\program files\IBM\websphere MQ\Qmgrs(QM1)\errors\logfiles ]p

Path for UNIX, LINUX, and SOLARIS:-p

[$/var/mqm/qmgrs/Qm1/errors/logfiles ]p



 *  
:- the operations or errors which are occurring on MQ series are considered
as MQ series level errors.p

Default path for windows :- p

[ C:]program files\IBM\Websphere mq\errors\log files ]p

Path for UNIX, LINUX, SOLARIS :-p

[ $/var/mqm/errors/logfiles ]p



 ÿ ' :- ahe person or user or application trying to connect access MQseries server or
queue manager they need MQ series client installed at their side p

 '' 
:-ahe MQseries client will interact with MQ series server using server connection
(SVRCONN) or Client connection channel(CLNaCONN)p

In MQ client sid ewe have three environmental variablesp

1.  ½ ( MQI channels )p

2. ÿ ( MQI channel tables )p

3. ÿ (MQI channel library )p

ÿ  '
* ''  '''  :-p

DEFINE CHANNEL(SVR) CHLaYPE(SVRCONN) aRPaYPE(aCP) DESCR(µSERVER CONNECaION


CHANNEL(not mandatory))p

Syntax:- p

Set mqserver=server connection channel name/trptype/IP address(port)p

Eg :- set Mq server=SVR\tcp\127.0.0.1(1000)p

Set MQSERVER p

Result:- svr\tcp\127.0.0.1(1000)p

D  D     p


MQSeries differentiatesp

Between persistent and non-persistent messages. Delivery of persistent messages is assured; they
Are written to logs to survive system failures. In an AS/400 these logs are Journal Receivers.p

Non-persistent messages cannot be recovered after a system restart.p

(ÿ ' '#


 %
 p

ahe client starts a program that puts a message on a queue. For this function five MQSeries API calls
are executed p

‡ ÿ&to connect to the queue manager in the serverp

‡ D  àto open the message queue QS1 for outputp

‡ D & to put a message in the queuep

‡ ÿ & to close the queue QS1p

‡ ÿ àto disconnect from the queue managerp

( ÿ '  *


 $ p

ahe client program knows the name of its input queue, here QA1 or QB1. ahe application can use two
modes of communication: ‡ ÿ   p

If the application uses this mode of communication with the server program, it waits for the message
to arrive before it continues processing. ahis means, the reply queue is open and an   with wait
option has been issued.p

ahe client application must be able to deal with two possibilities:p

‡ ahe message arrives in time.p

‡ ahe timer expires and no message is there.p

p
p
p

You might also like