Part I: Websphere MQ Interview Q&A (To Refresh / Boost our knowledge)

  1. 1.   What is MQ and what does it do?
Ans. MQ stands for MESSAGE QUEUEING. WebSphere MQ allows application programs to use message queuingto participate in message-driven processing. Application programs can communicate across different platforms by using the appropriate message queuing software products.
2. What is Message driven process?
Ans . When messages arrive on a queue, they can automatically start anapplication using triggering. If necessary, the applications can be stopped when the message (or messages) have been processed.
3. What are advantages of the MQ?
Ans. 1. Integration.
2. Asynchrony
3. Assured Delivery
4. Scalability.
4. How does it support the Integration?
Ans. Because the MQ is independent of the Operating System you use i.e. it may be Windows, Solaris,AIX.It is independent of the protocol (i.e. TCP/IP, LU6.2, SNA, NetBIOS, UDP).It is not required that both the sender and receiver should be running on the same platform
5. What is Asynchrony?
Ans. With message queuing, the exchange of messages between the sending and receiving programs is independent of time. This means that the sending and receiving application programs are decoupled; the sender can continue processing without having to wait for the receiver to acknowledge receipt of the message. The target application does not even have to be running when the message is sent. It can retrieve the message after it is has been started.
6. What are the hardware and Software requirements for MQ Installation in AIX?
Ans. WebSphere MQ for AIX, V5.3 runs on any machine that supports the AIX V4.3.3 PowerPC® 32.bit, or AIX® V5.1 Power 32 bit only operating system.
Disk Storage: Typical storage requirements are as follows:
1 Server installation: 50 MB
2. Client installation: 15 MB
3 Data storage (server): 50 MB
4. Data storage (client): 5 MB.
Software Requirements:
Operating system: The operating systems supported by WebSphere MQ for AIX, V5.3 are:
1. AIX V4.3.3, with PTF U472177, running in a 32 bit environment, on 32 or 64 bit hardware.
2. AIX V5.1, with PTFs U476879, U477366, U477367 and U477368, and APAR fix IY29345 running 32 bit kernel running on 32 or 64 bit hardware.
3. AIX V5.1, with PTF U476879, U477366, U477367 and U477368, and APAR fix IY29345 running 64 bit kernel running on 64 bit hardware.
Connectivity The network protocols supported by WebSphere MQ for AIX, V5.3 are:
1. TCP/IP
2. SNA LU 6.2.
Databases: DB2 7.1, 7.2
Oracle 8i and 9i
Sybase v12 or v 12.5
Java: If you want to use the Java Messaging Support, you need the Java Runtime Environment Version 1.3 or later
What are the software and hardware requirements for installing MQ on Windows?
Ans: MQ v 5.3 supports Windows 2000, Windows 2000XP,Windows 2000NT,
Windows 2003 SE, Windows 2003EE.
Disk Storage: Typical storage requirements are as follows:
1 Server installation: 50 MB
2. Client installation: 15 MB
3 Data storage (server): 50 MB
4. Data storage (client): 5 MB.
Connectivity The network protocols supported by WebSphere MQ for AIX, V5.3 are:
1. TCP/IP
2. SNA LU 6.2.
3. LU 6.2
4. NetBIOS
Databases: DB2 7.1, 7.2
Oracle 8i and 9i
Sybase v12 or v 12.5
Java: If you want to use the Java Messaging Support, you need the Java Runtime Environment Version 1.3 or later
7. What is a Message and what does it contain?
Ans: A messageis a string of bytes that is meaningful to the applicationsthat use it. Messages are used to transfer information from one application program to another (or between different parts of the same application). The applications can be running on the same platform, or on different platforms.
WebSphere MQ messages have two parts:
1. Theapplicationdata.The content and structure of the application data is defined by the application programs that use it.
2. A message descriptor.The message descriptor identifies the message and contains additional control information, such as the type of message and the priority assigned to the message by the sending application. WebSphere MQ defines the format of the message descriptor. For a complete description of the message descriptor,
8. What is the Max Length of the message does MQ support/
Ans: The default maximum message length is 4 MB, although you can increase this to a maximum length of 100 MB (where 1 MB equals 1 048 576 bytes).
9. What is the difference between Persistent and Non Persistent Messages?
Ans: In Web Sphere MQ, messages can be either persistent or non persistent. Persistent messages are logged and can be recovered in the event of a WebSphere MQ failure. Thus, persistent messages are guaranteed to be delivered once and only once. Nonpersistent messages are not logged. Web Sphere still guarantees to deliver them not more than once, but it does not promise to deliver them once.
10. What is the effect of using Persistant messages?
Ans: Persistent messages are usually logged. Logging messages reduces the performance of your application, so use persistent messages for essentialdata only. If the data in a message can be discarded if the queue manager stops or fails, use a nonpersistent message.
WebSphere MQ messages:
Messages are made up of Two parts: Message descriptor, Application data
Types of messages?
Datagram: A Message sent with no response expected.
Request: A Message sent for which a response is expected.
Reply: A Response Message for a requested message.
Report: A Message that describes the occurrence or event
Ex COA/COD
Sizes ?
Qmanagerà10000 Msgs Maxmsglengthà4 Mb
Queueà5000 Msgs Maxmsglengthà4 Mb
11. What is the attribute used to see the Message length?
Ans: MaxMsgLength
12. What is MQ Client?
Ans: A Web Sphere MQ client is a component that allows an application running on a system to issue MQI calls to a queue manager running on another system. The output from the call is sent back to the client, which passes it back to the application.
13. What is MQ Server?
Ans: A Web Sphere MQ server is a queue manager that provides queuing services to one or more clients. All the Web Sphere MQ objects, for example queues, exist only on the queue manager machine (the Web Sphere MQ server machine), and not on the client. A Web Sphere MQ server can also support local Web Sphere MQ
Applications
14. What are the Objects used in Web sphere MQ?
Ans:
1. Queue Manager
2. Queues
3. Channels
4. Processes
5. Name lists.
15. Mention the No of Characters required for creating names of the MQ objects?
Ans: For MQ Channels it is 20 Characters
For Remaining objects it is 48 characters.
16. What about is the Default port number for MQ Queue Manager?
Ans: 1414
17. Difference between MQSC commands and Control commands?
MQSC Commands – These commands are used to handle the admin relatedfunctions for the components that are present in the MQ Series. In general MQSC commands are used for creating and maintaining Message channels, Queue Managers, Clusters etc…
Control Commands – These commands are used to manage the processes and services that are helpful in the functioning of the MQ Series. In general thesecommands are used for Channel listener, Channel Initiator, Trigger monitor etc…
18. Is the MQSC attributes are Case sensitive?
Ans: MQSC commands, including their attributes, can be written in uppercase or lowercase. Object names in MQSC commands are folded to uppercase (that is, QUEUE and queue are not differentiated), unless the names are enclosed within single quotation marks. If quotation marks are not used, the object is processed with a name in uppercase.
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.
· ALTER :-to update or modify the existing objects
· 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
19. How can we write the MQSC commands that have too many parameters/
Ans: For commands that have too many parameters to fit on one line, usecontinuation characters to indicate that a command is continued on the following line:
1. A minus sign ( ) indicates that the command is to be continued from the start of _ the following line.
2. A plus sign (+) indicates that the command is to be continued from the first nonblank character on the following line.
20. What is programmable command format (PCF) commands?
These commands are issued from a programme for local or remote administration done by programmers.
21. What are commands used for creating the Queue manager from theCommand prompt?
Ans: crtmqm -q -d MY.DEFAULT.XMIT.QUEUE -u DEAD.LETTER.QUEUE QM1
Here -q used to define the Queue manager QM1 as a Default Queue manager
-d is used to define the default transmission Queue -u is used to define the default dead letter queue.
22. How can U make the existing Queue Manager as an default Queue Manager?
Ans: On Windows systems, use the Web Sphere MQ Services snap-in to display the properties of the queue manager, and check the Make queue manager the default box. You need to stop and restart the queue manager for the change to take effect.
23. Where will be the backup files present after creating the Queue Manager?
Ans: Windows systems: If you use Web Sphere MQ for Windows NT andWindows 2000, configuration information is stored in the Windows Registry.
UNIX Systems: 1. When you install the product, the Web Sphere MQconfiguration file (mqs.ini) is created. It contains a list of queue managers that is updated each time you create or delete a queue manager. There is one mqs.ini file per node.
2. When you create a new queue manager, a new queue managerconfiguration file (qm.ini) is automatically created. This contains configurationparameters for the queue manager.
24. What is the command used for starting the Queue Manager?
Ans: strmqm QMName
25. What is the command used for stopping the Queue manager?
Ans: endmqm -w QMName
The command waits until all applications have stopped and the queue manager has ended.
endmqm –i QMName
This type of shutdown does not wait for applications to disconnect from the queue manager.
26. What’s the message code for Stopping a Queue Manager?
AMQ4044 Queue manager stopping
27. What is the command used to delete the QueueManager?
Ans: dltmqm QMName
28. Display the attributes of the Queue Manager QM1?
Ans: runmqsc QM1 Display qmgr
What is Queue?
Ans: A queueis 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
29. What is the Default max Queue depth?
Ans 5000
30. What the different 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 orautomatically 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.
31. 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
32. 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
33. 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.
34. 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.
35. 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 dead-letter queue on each queue manager involved.
36. What is the Max size that Queues support in MQ v5.3?
Ans.They support around 2GB of Size
37. How can u create a Transmission Queue from a local Queue?
Ans. Change the usage attribute from normal to Transmission
38. Define a Local Queue LQ using the MQSC Commands in the QM QM1
Ans: runmqsc QM1
Define qlocal (LQ)
39. 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.
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.

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.
41. What is Process Definition and what are the attributes does it contain?
Ans: A process definitionobject 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 dataspecific to the application.
42. 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 adistributed environment.
Message channels Message channel agents
Transmission queues Channel initiators and listeners
Channel-exit programs
43. 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 thetarget queue manager or the partner queue manager.
44. 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.
45. What is channel and mention different types of channels in MQ?
Ans: Channelsare 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
46. 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
47. How many Channel Combinations?
1. Sender-receiver Channel
2. Requester-sender Channel
3. Cluster-Sender- Receiver Channel
4. Requester-server Channel
5. Server-receiver Channel
6. Client-Server Channel
48. 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
49. What are different Channel status?
Ans: Channel Status:
1. Inactive 3.Retrying
2. Running 4.Stopped
50. 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.

Comments