You are on page 1of 13

What is Queue?

Ans: A queue is a data structure used to store messages. A queue manager owns each queue. The
queue manager is responsible for maintaining the queues it owns, and for storing all the messages it
receives onto the appropriate queues
What is the Default max Queue depth?
Ans 5000

Types of Queues?
Local Queue Remote Queues Alias Queues
Model Queue Dynamic Queues Cluster Queues.
Queue: A safe place to store messages for Prior-To-Delivery, it belongs to the Qmgr to which the
application is connected.
Model Queue: Model queue is a template of a queue definition that uses when creating a dynamic queue.
Alias Queue: Queue definition, which is Alias to an actual Local or Remote Q. Used for security and easy
maintenance.
Remote Queue: Object that defines a Queue belongs to another Q Manager (Logical Def).
Initiation Queue: An initiation queue is a local queue to which the queue manager writes a trigger
message when certain conditions are met on another local queue
Dynamic Queue: Such a queue is defined on the fly when the application needs it. Dynamic queues may
be retained by the queue manager or automatically deleted when the application program ends. Use- To
store intermediate results.

Cluster Queue: Custer queue is a local queue that is known throughout a cluster of queue managers.

Reply-To-Queue: A request message must contain the name of the queue into which the responding
program must put the Reply Message.

Queue Manager: Provides Messaging services and manages the Queues, Channels, and Processes that
belongs to it.

Alias Q Manager: Queue-manager aliases, are created using a remote-queue definition with a blank
RNAME.
What are the attributes required for the Remote Queue Definition?
Ans: 1.Name of the Queue 2. Transmission Queue Name.
3. Remote QueueManager name 4. Remote Local Queue Name

How can U define Queues in MQ?


Ans: Queues are defined to Web Sphere MQ using:
1. The MQSC command DEFINE
2. The PCF Create Queue command
What is Transmission Queue?
Ans: Transmission queues are queues that temporarily store messages that are destined for a remote
queue manager. You must define at least one transmission queue for each remote queue manager to
which the local queue manager is to send messages directly.
What is Initiation Queues?
Ans: Initiation queues are queues that are used in triggering. A queue manager puts a trigger message on
an initiation queue when a trigger event occurs. A trigger event is a logical combination of conditions that
is detected by a queue manager.
What is Dead Letter Queue?
Ans: A dead-letter (undelivered-message) queue is a queue that stores messages that cannot be routed
to their correct destinations. This occurs when, for example, the destination queue is full. The supplied
dead-letter queue is called SYSTEM.DEAD.LETTER.QUEUE. For distributed queuing, define a deadletter queue on each queue manager involved.
What is the Max size that Queues support in MQ v5.3?
Ans.They support around 2GB of Size
How can u create a Transmission Queue from a local Queue?
Ans. Change the usage attribute from normal to Transmission
Define a Local Queue LQ using the MQSC Commands in the QM QM1
Ans: runmqsc QM1
Define qlocal (LQ)
What are the Difference B/W Predefined & Dynamic Queues?
Ans: Queues can be characterized by the way they are created:
1. Predefined queues are created by an administrator using the appropriate MQSC or PCF commands.
Predefined queues are permanent; they exist independently of the applications that use them and survive
Web Sphere MQ restarts.
2 Dynamic queues are created when an application issues an MQOPEN request specifying the name of a
model queue. The queue created is based on a template queue definition, which is called a model queue.

What is the Algorithm followed in retrieving the Messages from the Queue?
Ans: 1.First-in-first-out (FIFO).
2.Message priority, as defined in the message descriptor. Messages that have the same priority are
retrieved on a FIFO basis.
3. A program request for a specific message.
What is Process Definition and what are the attributes does it contain?
Ans: A process definition object defines an application that starts in response to a trigger event on a
WebSphere MQ queue manager. The process definition attributes include the application ID, the
application type, and data specific to the application.

What is intercommunication and its components to send message ?


What is Intercommunication?
Ans: In Web Sphere MQ, intercommunication means sending messages from one Queue manager to
another. The receiving queue manager could be on the same machine or another; nearby or on the other
side of the world. It could be running on the same platform as the local queue manager, or could be on
any of the platforms supported by Web Sphere MQ. This is called a distributed environment.
Message channels Message channel agents
Transmission queues Channel initiators and listeners
Channel-exit programs
What is Distributed Queue Management (DQM).
Web Sphere MQ handles communication in a distributed environment such as this using DQM.The local
queue manager is sometimes called the source queue manager and the remote queue manager is
sometimes called the target queue manager or the partner queue manager.

What is the Objects required for the DQM?


Ans: On source QueueManager:
1. Transmission Queue 2. Remote queue definition.
3. Dead Letter Queue(recommended) 4. Sender Channel
On Target Queue Manager
1. Local Queue 2. Dead Letter Queue 3. Receiver Channel 4.Listenr
***.The sender and receiver channels names should be same.

What is channel and mention different types of channels in MQ?


Ans: Channels are objects that provide a communication path from one queue manager to another.
Channels are used in distributed queuing to move messages from one queue manager to another. They
shield applications from the underlying communications protocols. The queue managers might exist on
the same, or different, platforms. Different types of Channels:
1. Sender-Receiver Channels
2. Requester-Server Channels

3. Client Connection channels


4. Server Connection Channels.
5. Cluster Sender.
6. Cluster Receiver Channels

What are MQI channels and there types?


MQI channels are the channels that carry messages from MQ Client application to the MQ server and
vice versa.They are Bi-directional Channels
1. Server-connection 2. Client-connection

How many Channel Combinations?


1.Sender-receiver Channel 4.Requester-server Channel
2.Requester-sender Channel 5. Server-receiver Channel
3.Cluster-Sender- Receiver Channel 6.Client-Server Channel
What are the attributes required for the Sender Channel?
Ans: 1. The Name of the Channel 4.Transport Type
2. The Connection name 5.Scyexit
What are different Channel status?
Ans: Channel Status:
1. Inactive 3.Retrying
2. Running 4.Stopped
What about Initializing & Binding states?
Ans: Before running state first the channel will initializes the listener & Binds with the Receiver Channel
then it goes into running mode.
Tell me Some Channel Attributes?
Batch Heartbeat Interval (BATCHHB): This heartbeat interval allows a sending channel to verify that the
receiving channel is still active just before committing a batch of messages. If the receiving channel is not
active, the batch can be backed out rather than becoming in-doubt, Batch interval (BATCHINT), Batch
size (BATCHSZ), Channel type (CHLTYPE), Cluster (CLUSTER), Cluster namelist (CLUSNL),
Connection name (CONNAME), Convert message (CONVERT), Disconnect interval (DISCINT),
Heartbeat interval (HBINT), KeepAlive Interval (KAINT), Long retry count (LONGRTY), Long retry interval
(LONGTMR), Maximum message length (MAXMSGL)

Why is Channel RETRYINT attribute used?


If a message is places in DLQ because of put inhibited or queue full condition, the DLQ handler attempts
to put the message back to the destination queue. This interval is called as RETRYINT by default the retry
interval is 60 seconds.
Receiver Cluster Receiver Requester

What is channel disconnect interval?


This is a time-out attribute, specified in seconds, for the server, cluster-sender, and cluster-receiver
channels. The interval is measured from the point at which a batch ends, that is when the batch size is
reached or when the batch interval expires and the transmission queue becomes empty. If no messages
arrive on the transmission queue during the specified time interval, the channel closes down

Explain the channel attribute BATCHSIZE?


BATCHSIZE denotes the maximum number of messages that can be sent through a channel before
taking a checkpoint. This parameter is valid only for channels with a channel type (CHLTYPE) of SDR,
SVR, RCVR, RQSTR, CLUSSDR, or CLUSRCVR. The value must be in the range 1 through 9999.
What is BATCH HEARTBEAT INTERVAL?
Ans: The batch heartbeat interval allows a sending channel to verify that the receiving channel is still
active just before committing a batch of messages, so that if the receiving channel is not active, the batch
can be backed out rather than becoming in-doubt, as would otherwise be the case. By backing out the
batch, the messages remain available for processing so they could, for example, be redirected to another
channel.
What is Keep Alive Interval?
Ans: The Keep Alive Interval parameter is used to specify a time-out value for a channel. The Keep Alive
Interval parameter is a value passed to the communications stack specifying the Keep Alive timing for the
channel. It allows you to specify a different keep alive value for each channel. The value indicates a time,
in seconds, and must be in the range 0 to 99999.
What is LONG Retry count?
Ans: Specify the maximum number of times that the channel is to try allocating a session to its partner. If
the initial allocation attempt fails, the short retry count number is decremented and the channel retries the
remaining number of times.

What are the ways to start a channel?


Use the MQSC command START CHANNEL
Use the control command runmqchl to start the channel as a process
Use the channel initiator to trigger the channel
Type of channel states:
Inactive and Current- Stopped, Starting, Retrying and Active

What are the three options for stopping channels?


QUIESCE FORCE TERMINATE

What are the components of message channel?


A queue manager to communicate with another queue manager uses message channel. The components
of a message channel are
1. Sender Message channel agent: Sender MCA is a program that transfers messages from a
transmission queue to a communication link
2. Receiver MCA: It transfers messages from the communication link into the target queue

3. Communication protocol: Responsible for transferring messages A message channel is unidirectional.


What is Message Channel agent (MCA)?
Ans: A message channel agent (MCA) is a program that controls the 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 remote queue manager.
A message channel agent is called a caller MCA if it initiated the communication; otherwise it is called a
responder MCA.
What is Channel initiator and Listeners?
Ans: A channel initiator acts as a trigger monitor for sender channels, because a transmission queue may
be defined as a triggered queue. When a message arrives on a transmission queue that satisfies the
triggering criteria for that queue, a message is sent to the initiation queue, triggering the channel initiator
to start the appropriate sender channel. You can also start server channels in this way if you specified the
connection name of the partner in the channel definition. This means that channels can be started
automatically, based upon messages arriving on the appropriate transmission queue.
You need a listener program to start receiving (responder) MCAs. Responder MCAs are started in
response to a startup request from the caller MCA; the channel listener detects incoming network
requests and starts the associated channel.
Channel Errors?
Due to: 1. Xmitq is set to get disabled 2. Network Issues
3.QueueManager Stopped 4. Listener is not running 5.TriggerTurned Off

Explain Channel-Exit programs and what are the types?


Channel-exit programs are called at defined places in the processing carried out by MCA programs
Security Exit: You can use security exit programs to verify that the partner at the other end of a channel is
genuine
Message Exit: Message Exit can be used for Encryption on the link, message data conversion, validation
of user ID,
Message-retry Exit: Message-retry exit is called when an attempt to open the target queue is
unsuccessful
Sender and receiver Exit: You can use the send and receive exits to perform tasks such as data
compression and decompression
Channel auto-definition Exit Transport-retry Exit

What is the Different Logging Methods available?


Ans: There are two different types available
1. Circular: The circular logging is used for restart recovery. It is the default logging method. Circular
isused in Development and Testing Queues. Circular logging keeps all restart Data in a ring of log files.
Logging fills the first file in the ring, then moves on to the and so on, until all the files are full. It then goes
back to the first file in the ring and starts This continues as long as the product is in use, and has the
advantage that you never run out of log files.

2. Linear: Linear logging gives you both restart recovery and media recovery. It is used in Production.
Linear logging keeps the log data in a continuous Sequence of files. Space is not reused, so you can
always retrieve any record logged from the time that the queue manager was created. As disk space is
finite, you might have to think about some form of archiving. It is an administrative task to manage your
disk space for the log, reusing Or extending the existing space as necessary.
What is the Default location where the logs are stored and mention the default sizes?
Ans: Default location:
Windows: C:\Program Files\IBM\WebSphere MQ\log\qmgr
UNIX: /var/mqm/log

What is the log file size?


Ans: In Web Sphere MQ for Windows NT and Win 2000, the minimum value is 32, and the maximum is
16 384. The default value is 256, giving a default log size of 1 MB.
In Web Sphere MQ for UNIX systems, the minimum value is 64, and the maximum is 16 384. The default
value is 1024, giving a default log size of 4 MB.
How will you change the log file size?
Ans ; You cannot change the log file size. For this you need to drop and re-create the queue manager.
The number of log files primary & secondary can be changed but you need to restart the Q manager for
the changes to take effect.
what is the number for log primary and secondary file allocated?
Ans: Primary log files: The number of primary log files to be allocated is 3 by default the minimum is 2 and
MAX in Win 253 / Unix 510
Secondary log files: The number of secondary log files to be allocated is 2 by default the minimum is 1
and MAX in Win 252 / Unix 509
What is the command used for creating the listener?
Ans: crtmqlsr -t tcp -m QMNAME -p portno
What is the commands used for running listener in 5.3 Version?
Ans: runmqlsr -t tcp -m QMNAME -p portno
What is command used to perform task on the MQ services?
Ans: amqmdain

What are commands used on the Command server?


Ans: 1.strmqcsv: to start the command server
2. dspmqcsv: to display the command server
3. endmqcsv: To end the command server.
Is there is any chance for the Message lost?
Ans: If the target queuemanager doesn.t contain the dead letter queue defined and if the messages are

running on a fast channel and of non persistant,Then there is a chance of the message loss.
What is the command that is used to provide authorization for the clients?
Ans: setmqaut -m QMName -t queue -n Queuename -p GUEST +all
What are the common errors u get in DQM? Explain how to resolve ?
Ans: mqrc 2058: MQRC_Q_MGR_NAME_ERROR
Mqrc 2059: MQRC_Q_MGR_NOT_AVAILABLE.
Mqrc 2033: MQRC_NO_MSG_AVAILABLE.
Mqrc 2085: MQRC_UNKNOWN_OBJECT_NAME.
Mqrc 2009: MQRC_CONNECTION_BROKEN.
Mqrc 2043: MQRC_OBJECT_TYPE_ERROR.
Mqrc 2086: MQRC_UNKNOWN_OBJECT_Q_MGR.
Mqrc 2035: MQRC_NOT_AUTHORIZED.
What are different modes in which a application can connect to a Queuemanager?
Ans: 1.Binding mode: In binding mode, also known as server connection, the communication to the queue
manager utilizes inter-process communications. One of the key factors that should be kept in mind is that
binding mode is available only to programs running on the MQSeries server that hosts the queue
manager. A program using binding mode will not run from an MQSeries client machine. Binding mode is a
fast and efficient way to interact with MQSeries. Certain Facilities, such as XA transaction co-ordination
by queue manager, are available only in binding mode.
2. Client Connection: Client connection uses a TCP/IP connection to the MQSeries Server and enables
communications with the queue manager. Programs using client connections can run on an MQSeries
client machine as well as on an MQSeries server machine. Client connections use client channels on the
queue manager to communicate with the queue manager. The client connection does not support XA
transaction coordination by the queue manager.
What are the different types of messaging systems used by JMS?
Ans: JMS applications use either the point-to-point (PTP) or publish/subscribe style of messaging.
Point-to-Point: Point-to-point messaging involves working with queues of messages. The sender sends
messages to a specific queue to be consumed normally by a single receiver. In point-to-point
communication, a message has at most one recipient. A sending client addresses the message to the
queue that holds the messages for the intended (receiving) client.
Publish/Subscribe: In contrast to the point-to-point model of communication, the publish/subscribe model
enables the delivery of a message to multiple recipients. A sending client addresses, or publishes, the
message to a topic to which multiple clients can be subscribed. There can be multiple publishers, as well
as subscribers, to a topic.

Is It Possible to use one transmission Queue for the multiple message channels?
Ans: It is possible to define more than one channel per transmission queue, but only one of these
channels can be active at any one time. This is recommended for the provision of alternative routes
between queue managers for traffic balancing and link failure corrective action. A transmission queue
cannot be used by another channel if the previous channel to use it terminated leaving a batch of
messages in-doubt at the sending end.
What is the command used to test whether the channel is active or not?

Ans: runmqsc QMName


Ping channel (channel name).
What are the administrative commands that are used in Publish and Subscribe?
Ans: The strmqbrk command is used to start a broker. The first time this command is run on a queue
manager, all the relevant MQSeries objects are automatically created.
strmqbrk -m MYQMGRNAME
The dspmqbrk command is used to check the status of the broker. Possible states are: starting, running,
stopping, quiescing, not active and ended abnormally.
dspmqbrk -m MYQMGRNAME
The endmqbrk command is used to stop a broker. There are two options: -c requests a controlled
shutdown (default), -i requests an immediate shutdown.
-endmqbrk -i -m MYQMGRNAME

What is multiple hoping?


Ans: If there is no direct communication link between the source queue manager and the target queue
manager, it is possible to pass through one or more intermediate queue managers on the way to the
target queue manager. This is known as a multi-hop.

What is Local administration and Remote administration?


Local Administration: Means carrying out administration tasks on any queue managers you have defined
on your local system.
Remote Administration: This allows you to issue commands from your local system that are processed on
another system. For example, you can issue a remote command to change a queue definition on a
remote queue manager. You do not have to log on to that system, although you do need to have the
appropriate channels defined. The queue manager and command server on the target system must be
running

Difference between Control Commands used in Windows and other Os?


Control commands on are case sensitive other OS but Windows they can be used any way.

What is MQOO_BIND_ON_OPEN option on the MQOPEN call ?


When this attribute is set it forces all the messages sent to this queue to be sent to the same instance of
the queue (go to the same queue in cluster)

Difference between MQPUT and MQPUT1 call ?


The MQPUT1 call always operates as though MQOO_BIND_NOT_FIXED were in effect, that is, it always

invokes the workload management routine.

When is Channel security exit program called?


Are called at MCA initiation and termination
Stopping unauthorized queue managers putting messages on your queues
Use OS security, Object Authority Manager (OAM) on WebSphere MQ user-written procedures

What happens if DEAD letter Queue is not defined?


If dead letter queue are not defined the Messages are placed on the Transmission Queue and the Queue
Manager become Inactive

Explain Remote queue definitions? Advantages?


These are definitions for queues that are owned by another queue manager
Advantages: The advantage of remote queue definitions is that they enable an application to put a
message to a remote queue without having to specify the name of the remote queue or the remote queue
manager, or the name of the transmission queue. This gives you location independence.

What happens if channel terminates when fast non-persistent messages are in transit?
If a channel terminates while fast, non-persistent messages are in transit, the messages are lost and it is
up to the application to arrange for their recovery if required. If the receiving channel cannot put the
message to its destination queue then it is placed on the dead letter queue, if one has been defined. If
not, the message is discarded.

What happens when a message cannot be delivered?


Message-retry: If the MCA is unable to put a message to the target queue for a reason that could be
transitory (for example, because the queue is full), the MCA has the option to wait and retry the operation
later
Return-to-sender: If message-retry was unsuccessful, or a different type of error was encountered, the
MCA can send the message back to the originator
Dead-letter queue: If a message cannot be delivered or returned, it is put on to the dead-letter queue
(DLQ). You can use the DLQ handler to process the message
Recovery scenario Disk Drive Full, damaged Queue manager object, Damaged single object, Automatic
media recovery failure
MQ ensures that messages are not lost by maintaining records (logs) of the activities of the queue
managers that handle the receipt, transmission, and delivery of messages

How to Process Messages from the Dead-letter-Queue?


We can Process the DLQ messages using runmqdlq command for sending messages to the destination
Queues or target Queues. Use the runmqdlq command to start the dead-letter queue (DLQ) handler,
which monitors and handles messages on a dead-letter queue.
runmqdlq QName QMgrName
Use the Dead-Letter-Queue-Handler to perform various actions on selected messages by specifying a set
of rules that can both select a message and define the action to be performed on that message.

The runmqdlq command takes its input from stdin. When the command is processed, the results and a
summary are put into a report that is sent to stdout.
Which field of the MQDLH structure contains a reason code that identifies why the message is on the
DLQ?
Reason field
What is completion code(MQCC) and reason code(MQRC)?
Completion code gives the status of the current transaction it can be 0, 1, 2. 0- for Successful completion
(MQCC_OK), 1- Warning (MQCC_WARNING), 2- call failed (MQCC_FAILED). Reason code is that which
gives the reason for which the transaction fails it can be MQRC_NONE, MQRC_BACKED_OUT etc.

What is Correl ID?


This is a byte string that the application can use to relate one message to another, or to relate the
message to other unit of work that the application is performing. The correlation identifier is a permanent
property of the message, and persists across restarts of the queue manager

Explain commit and Back Out units of work?


When a program puts a message on a queue within a unit of work, that message is made visible to other
programs only when the program commits the unit of work.
Commit: To commit a unit of work, all updates must be successful to preserve data integrity. If the
program detects an error and decides that the put operation should not be made permanent, it can back
out the unit of work.
Back Out: When a program performs a back out, WebSphere MQ restores the queue by removing the
messages that were put on the queue by that unit of work. The way in which the program performs the
commit and back out operations depends on the environment in which the program is running

BackoutCount (MQLONG)?
This is a count of the number of times that the message has been previously returned by the MQGET call
as part of a unit of work, and subsequently backed out. BackoutCount is the number of times the
application tried and failed to put the messages in the Queue
What is segmentation and explain segmentation Flag?
When a message is too big for a queue, an attempt to put the message on the queue usually fails.
Segmentation is a technique whereby the queue manager or application splits the message into smaller
pieces called segments, and places each segment on the queue as a separate physical message. The
application that retrieves the message can either retrieve the segments one by one, or request the queue
manager to reassemble the segments into a single message that is returned by the MQGET call.

What are Namelist? when do you use it?


A namelist is a WebSphere MQ object that contains a list of other WebSphere MQ objects. Typically,
namelists are used
By trigger monitors, where they are used to identify a group of queues.
Namelists are also used with queue manager clusters to maintain a list of clusters referred to by more

than one WebSphere MQ object.


The advantage of using a namelist is that it is maintained independently of applications; it can be
updated without stopping any of the applications that use it. Also, if one application fails, the namelist is
not affected and other applications can continue using it. Namelists are also used with queue manager
clusters to maintain a list of clusters referred to by more than one WebSphere MQ object
What are name services?
The name service is an installable service that provides support to the queue manager for looking up the
name of the queue manager that owns a specified queue.
What is Local units of work (uses a single-phase commit process) and Global unit of Work (uses a twophase commit process)?
Local unit of work: Units of work that involve only the queue manager are called local units of work.
Syncpoint coordination is provided by the queue manager itself (internal coordination) using a singlephase commit process.
Use global units of work when you also need to include updates to resources belonging to other resource
managers. Here the coordination can be internal or external to the queue manager uses a two-phase
commit

How will we start a command server?


Depending on the value of the queue manager attribute, SCMDSERV, the command server is either
started automatically when the queue manager starts, or must be started manually.
Start: Using strmqcsv saturn.queue.manager where saturn.queue.manager is the QM name
Display: dspmqcsv Stop: endmqcsv

When we use CCSID attribute of the ALTER QMGR command to change the CCSID of the QM what are
the components that need to be restarted?
Stop and restart the queue manager, stop and restart command server (A command server processes
command messages) and channel programs

What is a MQ Series Queue manager Configuration file (qm.ini)?


A queue manager configuration file (qm.ini) to effect changes for specific queue managers. There is one
qm.ini file for each queue manager on the node. (A queue manager configuration file, qm.ini, contains
config information relevant to a specific queue manager. There is one queue manager configuration file
for each queue manager. The qm.ini file is automatically created when the queue manager with which it is
associated is created. For example, the path and the name for a configuration file for a queue manager
called QMNAME is:/var/mqm/qmgrs/QMNAME/qm.ini)

What is name transformation in naming a Queue manager Configuration File?


A qm.ini file is held in the root of the directory tree occupied by the queue manager. For example, the path
and the name for a configuration file for a queue manager called QMNAME is:
/var/mqm/qmgrs/QMNAME/qm.ini A directory name is generated based on the queue manager name.
This process is known as name transformation.

What is a Websphere MQ configuration file (mqs.ini)?


Contains information relevant to all the queue managers on the node. It is created automatically during
installation (The WebSphere MQ configuration file, mqs.ini, contains information relevant to all the queue
managers on the node. It is created automatically during installation. The mqs.ini file for WebSphere MQ
for UNIX systems is in the /var/mqm directory. It contains: v The names of the queue managers v The
name of the default queue manager The location of the files associated with each of them)

How can we edit the configuration files?


Automatically using commands that change the configuration of queue managers on the node, Manually
using a standard text editor

When security checks are made?


Connecting to the queue manager (MQCONN or MQCONNX calls), Opening the object (MQOPEN or
MQPUT1 calls), Putting and getting messages (MQPUT or MQGET calls), Closing the object
(MQCLOSE)

You might also like