Wednesday, June 29, 2011

Integrate Websphere Application Server and MQ – part1

WebSphere Application Server can interoperate with WebSphere MQ in the following ways:

* By configuring WebSphere MQ as an external JMS provider using the WebSphere MQ messaging provider.
* By integrating a service integration bus into a WebSphere MQ network of queue managers using the default messaging provider and WebSphere MQ links.
* By integrating WebSphere MQ for z/OS® queues into a bus using the default messaging provider and a WebSphere MQ server.
WebSphere MQ links provide a traditional WebSphere MQ-style solution to connecting resources. WebSphere MQ servers add the ability to directly access WebSphere MQ queues from within a bus.

Method1: No bus: The WebSphere MQ messaging provider
The WebSphere MQ messaging provider does not use service integration. It provides JMS messaging access to WebSphere MQ directly from WebSphere Application Server.
Method2: Multi-bus: WebSphere MQ network as a foreign bus (using WebSphere MQ links)
A WebSphere MQ link provides an indirect connection between a service integration bus and a queue manager within a WebSphere MQ messaging network. With this type of connection, the messaging bus is seen by the WebSphere MQ network as a virtual queue manager, and the WebSphere MQ network is seen by service integration as a messaging bus. A Websphere MQ link allows WebSphere Application Server applications to send point-to-point messages to WebSphere MQ queues (defined as destinations in the service integration bus), and allows WebSphere MQ applications to send point-to-point messages to destinations in the service integration bus (defined as remote queues in WebSphere MQ). The link also allows WebSphere Application Server applications to subscribe to messages published by WebSphere MQ applications, and WebSphere MQ applications to subscribe to messages published by WebSphere Application Server applications. The link converts messages between the formats used by WebSphere Application Server and those used by WebSphere MQ, and handles data conversion of messages.
Method3: Single-bus: Queue manager as a bus member (a WebSphere MQ server)
A WebSphere MQ server provides a direct connection between service integration messaging engines in WebSphere Application Server and queue managers or queue sharing groups in WebSphere MQ for z/OS. WebSphere MQ server is designed to exploit the high availability, and optimum load balancing characteristics provided by a WebSphere MQ for z/OS network. WebSphere MQ server defines the connection and quality of service properties used for the connection, and also ensures that messages are converted between the formats used by WebSphere Application Server, and those used by WebSphere MQ.
=> Installation instructions for setting up a new WebSphere MQ installation to interoperate with WebSphere Application Server.
1. Install a supported version of WebSphere MQ
2. Follow the WebSphere MQ instructions for verifying your installation setup.
3. Configure WebSphere Application Server and WebSphere MQ to interoperate effectively.
4. At Node scope (not Server scope) set the WebSphere Application Server MQ_INSTALL_ROOT environment variable to the directory where WebSphere MQ is installed. WebSphere Application Server uses the MQ_INSTALL_ROOT setting to find the WebSphere MQ libraries for the WebSphere MQ messaging provider. If you use the default messaging provider and configure a WebSphere MQ server bus member, the bus uses the MQ_INSTALL_ROOT setting to establish a direct binding to WebSphere MQ rather than a TCP/IP network connection.
5. At Cell scope or Node scope, set the WebSphere Application Server MQ_CLEAR_MQ_FROM_OSGI_CACHE_ON_SHUTDOWN environment variable to True. This allows application server startup to automatically take account of changes that are made to the MQ_INSTALL_ROOT environment variable and WebSphere MQ JMS client libraries while the application server is stopped. If you do not set this variable, you must restart the application server a second time after any changes of this type, to enable the application to perform messaging using the WebSphere MQ messaging provider.
* Configuring a unified connection factory for the WebSphere MQ messaging provider
1. In the navigation pane, click Resources > JMS > JMS providers.
2. Select the WebSphere MQ messaging provider that you want to support the destination.
3. Optional: Change the Scope setting to the level at which the connection factory is visible to applications.
4. In the contents pane, under Additional Properties, click Connection factories to display a table of existing unified connection factories, with a summary of their properties.
5. To view or change the properties of an existing unified connection factory, click its name in the list. Otherwise, to create a new connection factory, complete the following steps:
1. Click New in the content pane.
2. Specify the following required properties.
Name
The name by which this connection factory is known for administrative purposes within IBM® WebSphere Application Server.
JNDI name
The JNDI name that is used to bind the connection factory into the namespace.
CCSID
The coded character set identifier for use with the WebSphere MQ queue manager; for example: 850. See the properties for the unified JMS connection factory for more details.
3. Click Apply. This defines the JMS connection factory to WebSphere Application Server, and enables you to view or change additional properties.
6. Optional: Change properties for the unified JMS connection factory, according to your needs.
7. Optional: Change connection pool properties and session pool properties, according to your needs.
8. Configure a non-default SSL repertoire. To do this, specify a custom property on the connection factory with name ssl.repertoire and a value of the name of the repertoire alias to be used. A list of available repertoire aliases can be found by navigating to Security > SSL certificate and key management > SSL configurations . For WebSphere MQ the only settings in the SSL configuration that are used are:
* Location of the Trust store and its password
* Location of the Key store and its password
Information about supported SSL cipher suites is ignored by the WebSphere MQ client.
9. Click OK.
10. Save any changes to the master configuration.
11. To have the changed configuration take effect, stop then restart the application server.
* Configuring a queue connection factory for the WebSphere MQ messaging provider
1. In the navigation pane, click Resources > JMS > JMS providers.
2. Select the WebSphere MQ messaging provider for the queue connection factory that you want to configure.
3. Optional: Change the Scope setting to the level at which the connection factory is visible to applications.
4. In the contents pane, under Additional Properties, click Queue connection factories to display a table of existing queue connection factories, with a summary of their properties.
5. To view or change the properties of an existing queue connection factory, click its name in the list. Otherwise, to create a new connection factory, complete the following steps:
1. Click New in the content pane.
2. Specify the following required properties.
Name
The name by which this connection factory is known for administrative purposes within IBM® WebSphere Application Server.
JNDI name
The JNDI name that is used to bind the connection factory into the namespace.
CCSID
The coded character set identifier for use with the WebSphere MQ queue manager; for example: 850. See the properties for the queue connection factory for more details.
3. Click Apply. This defines the connection factory to WebSphere Application Server, and enables you to view or change additional properties.
6. Optional: Change properties for the queue connection factory, according to your needs.
7. Optional: Change connection pool properties and session pool properties, according to your needs.
8. Configure a non-default SSL repertoire. To do this, specify a custom property on the connection factory with name ssl.repertoire and a value of the name of the repertoire alias to be used. A list of available repertoire aliases can be found by navigating to Security > SSL certificate and key management > SSL configurations . For WebSphere MQ the only settings in the SSL configuration that are used are:
* Location of the Trust store and its password
* Location of the Key store and its password
Information about supported SSL cipher suites is ignored by the WebSphere MQ client.
9. Click OK.
10. Save any changes to the master configuration.
11. To have the changed configuration take effect, stop then restart the application server.
* Configuring a topic connection factory for the WebSphere MQ messaging provider
1. In the navigation pane, click Resources > JMS > JMS providers.
2. Select the WebSphere MQ messaging provider for the topic connection factory that you want to configure.
3. Optional: Change the Scope setting to the level at which the connection factory is visible to applications.
4. In the contents pane, under Additional Properties, click Topic connection factories to display a table listing any existing topic connection factories, with a summary of their properties.
5. To view or change the properties of an existing topic connection factory, click its name in the list. Otherwise, to create a new connection factory, complete the following steps:
1. Click New in the content pane.
2. Specify the following required properties. You can specify other properties, as described in a later step.
Name
The name by which this topic connection factory is known for administrative purposes within IBM® WebSphere Application Server.
JNDI Name
The JNDI name that is used to bind the topic connection factory into the name space.
CCSID
The coded character set identifier for use with the WebSphere MQ queue manager; for example: 850. See the properties for the topic connection factory for more details.
3. Click Apply. This defines the destination to WebSphere Application Server, and enables you to view or change additional properties.
6. Optional: Change properties for the topic connection factory, according to your needs.
7. Optional: Change connection pool properties and session pool properties, according to your needs.
8. Configure a non-default SSL repertoire. To do this, specify a custom property on the connection factory with name ssl.repertoire and a value of the name of the repertoire alias to be used. A list of available repertoire aliases can be found by navigating to Security > SSL certificate and key management > SSL configurations . For WebSphere MQ the only settings in the SSL configuration that are used are:
* Location of the Trust store and its password
* Location of the Key store and its password
Information about supported SSL cipher suites is ignored by the WebSphere MQ client.
9. Click OK.
10. Save any changes to the master configuration.
11. To have the changed configuration take effect, stop then restart the application server.
* Configuring a queue for the WebSphere MQ messaging provider
1. In the navigation pane, click Resources > JMS > JMS providers.
2. Select the WebSphere MQ messaging provider for the queue destination that you want to configure.
3. Optional: Change the Scope setting to the level at which the JMS destination is visible to applications.
4. In the contents pane, under Additional Properties, click Queues to display a table of existing queue destinations, with a summary of their properties.
5. To view or change the properties of an existing queue destination, click its name in the list. Otherwise, to create a new queue, complete the following steps:
1. Click New in the content pane.
2. Specify the following required properties.
Name
The name by which this queue destination is known for administrative purposes within IBM® WebSphere Application Server.
JNDI name
The JNDI name that is used to bind the queue destination into the namespace.
Base Queue Name
The name of the queue to which messages are sent, on the queue manager specified by the Base Queue Manager Name property.
CCSID
The coded character set identifier for use with the WebSphere MQ queue manager; for example: 850. See the properties for the queue destination for more details.
3. Click Apply. This defines the queue destination to WebSphere Application Server, and enables you to view or change additional properties.
6. Optional: Change properties for the queue destination, according to your needs.
7. Optional: If you want WebSphere Application Server to try to use the WebSphere MQ queue manager’s remote administration utilities to create the queue, configure the WebSphere MQ Queue Connection properties.
If you have already created your underlying queue in WebSphere MQ using its administration tools (such as runmqsc or MQ Explorer), you do not need to configure any of the WebSphere MQ Queue Connection properties. You only need to configure these properties if you want WebSphere Application Server to try to use the WebSphere MQ queue manager’s remote administration utilities to create the queue.
To be able to browse or change these MQ Config properties, you must have installed the WebSphere MQ client. If you have not done this, the administrative console displays messages like the following:
The WMQQueueDefiner MBean has encountered an error.
WMSG0331E: The MQ Client is required for this functionality, but it is not installed.
Note: For any changes to these properties to take effect on the queue manager, the WebSphere MQ Queue Manager on which the queue resides (or will reside) must be configured for remote administration and be running.
For more details about these properties, see WebSphere MQ config properties for the queue destination.
8. Click OK.
9. Save any changes to the master configuration.
10. To have the changed configuration take effect, stop then restart the application server.
* Configuring a topic for the WebSphere MQ messaging provider
1. In the navigation pane, click Resources > JMS > JMS providers.
2. Select the WebSphere MQ messaging provider for the topic destination that you want to configure.
3. Optional: Change the Scope setting to the level at which the topic destination is visible to applications.
4. In the contents pane, under Additional Properties, click Topics to display a table of existing topic destinations, with a summary of their properties.
5. To view or change the properties of an existing topic destination, click its name in the list. Otherwise, to create a new topic destination, complete the following steps:
1. Click New in the content pane.
2. Specify the following required properties. You can specify other properties, as described in a later step.
Name
The name by which this topic destination is known for administrative purposes within IBM® WebSphere Application Server.
JNDI Name
The JNDI name that is used to bind the topic destination into the namespace.
Base Topic Name
The name of the WebSphere MQ topic to which messages are sent.
CCSID
The coded character set identifier for use with the WebSphere MQ queue manager; for example: 850. See the properties for the topic destination for more details.
3. Click Apply. This defines the topic destination to WebSphere Application Server, and enables you to view or change additional properties.
6. Optional: Change properties for the topic destination, according to your needs.
7. Click OK.
8. Save any changes to the master configuration.
9. To have the changed configuration take effect, stop then restart the application server.
* Configuring WebSphere MQ connection pooling
1. Display the Message Listener Service properties for the application server
1. In the navigation pane, click Servers > Application Servers
2. In the content pane, click the name of the application server.
3. Under Additional Properties, click Message Listener Service properties.
2. Select Custom Properties, to enable WebSphere MQ connection pooling, add the following custom properties:
MQJMS.POOLING.THRESHOLD
The maximum number of unused connections in the pool.
MQJMS.POOLING.TIMEOUT
The timeout in milliseconds for unused connections in the pool.
3. Click OK.
4. Save any changes to the master configuration.
5. To have the changed configuration take effect, stop then restart the application server

Tuesday, August 24, 2010

MQ Sending a Message

Create QM_ORANGE queue manager using WebSphere MQ Explorer/MQSC
On another machine/remote queue manager:
1. Start WebSphere MQ Explorer.
2. In the Navigator view, right-click the Queue Managers folder, then click New > Queue Manager The
Create Queue Manager wizard opens.
3. In the Queue Manager Name field, type QM_ORANGE.
4. Select the Make this as a default queue manager check box.
5. Click next twice to go to Step 3 of the wizard.
6. Ensure that the Start queue manager check box is selected.
7. Ensure that the Auto start queue manager check box is selected.
8. Click next to go to Step 4 of the wizard.
9. Ensure that the Create listener configured for TCP/IP check box is selected
10. If the Finish button is not available, type another port number in the Listen on port number field. If
the current value is 1414, try typing 1415 or 1416.
11. Click Finish.
An icon representing this queue manager is displayed in the Queue Managers folder in the Navigator view of
WebSphere MQ Explorer, and the queue manager automatically starts running after you create it.
Creating the sending queue manager using MQSC
Open a command prompt on the sending machine and follow these steps:
1. Create a default queue manager called QM_ORANGE by typing the command:
crtmqm -q QM_ORANGE
Messages tell you that the queue has been created and that the default WebSphere MQ objects have
been created.
2. Start this queue manager by typing the command:
strmqm QM_ORANGE
A message tells you when the queue manager has started.
3. You must now create a listener by typing the command:
runmqlsr -m QM_ORANGE -t TCP -p(port number)
Note: If you do not specify anything with the -p parameter, the default port 1414 is used, but note that
you cannot use the same port number on the sender and receiver, so one could be 1414 and the other
1415 for example.
You have now created the sending queue manager. The next task is to create the queues on this queue
manager.
Creating the queues on a queue manager using WebSphere MQ Explorer
On the remote queue manager:
1. In the Navigator view, expand the Queue Managers folder.
2. Expand queue manager QM_ORANGE.
3. Right click the Queues folder, then click New > Remote Queue Definition... The New Remote Queue
Definition wizard opens.
4. In the Name field, type QR.ORANGE
5. In the Remote queue field, type QM.APPLE.
6. In the Remote queue manager field, type QM_APPLE.
7. Ensure that the Transmission queue field is left blank.
8. Click Finish. You have now created the remote queue definition.
9. Click the QM_ORANGE queue manager.
10. Right-click the Queues folder, then click New > Local Queue The New Local Queue wizard opens.
11. In the Name field, type QMTX_APPLE.
12. In the Usage field, select Transmission.
13. Click Finish. You have now created the transmission queue on the local machine.
QR.ORANGE and Q.APPLE are displayed in the content view of the respective queue manager.
If the queues are not displayed in the Content view, click the Refresh button at the top of the Content view.
Creating the queues on the sending queue manager using MQSC
Open a command prompt on the sending machine and follow these steps:
1. Start MQSC by typing the command:
runmqsc QM_ORANGE
A message tells you that an MQSC session has started.
2. Define a transmission queue called QM_APPLE by typing the following command:
define qlocal(QMTX_APPLE) usage(xmitq)
A message tells you when the queue has been created.
3. Define a remote queue definition by typing the following command:
define qremote(QR.ORANGE) rname(QM.APPLE) rqmname(QM_APPLE) xmitq
(QMTX_APPLE)
You have now created the queues on the sending queue manager. The next task is to create the message
channel between the sending and receiving queue managers.
Creating the message channel using MQ Explorer
On the receiving/local queue manager, QM_APPLE:
1. In the Navigator view expand the queue manager QM_APPLE that you created earlier, then expand the
Advanced folder.
2. Right-click the Channels folder, then click New > Receiver Channel... The New Receiver Channel
wizard opens.
3. In the Name field, type QM_ORANGE.QM_APPLE.
4. Click Finish. You have now created the receiver channel on the receiving machine.
On the sending queue manager, QM_ORANGE:
5. Expand the queue manager QM_ORANGE that you created earlier, then expand the Advanced folder.
6. Right-click the Channels folder, then click New > Sender Channel... The New Sender Channel wizard
opens.
7. In the Name field, type QM_ORANGE.QM_APPLE, and then click next.
8. In the Connection name field, type the computer name or IP address & Port of the receiving
(QM_APPLE) machine (you should already have obtained this with your system administrator's help).
examples - conname = x.x.x.x(PORT)
9. In the Transmission queue field, type QM_APPLE.
10. Click Finish.
11. Click the Channels folder.
12. Right-click QM_ORANGE.QM_APPLE.
13. From the pop-up menu, click Start.
14. Click OK. You have now created the sender channel on the sending machine.
Note: You do not have to start the receiver channel, because it started automatically when you set up
the sender channel (when you set up the sender channel, you specified the receiver channel's IP
address).
You have now created a receiver channel, QM_ORANGE.QM_APPLE, on the receiving queue manager,
QM_APPLE, and a sender channel, QM_APPLE.QM_ORANGE, on the sending queue manager,
QM_ORANGE. You have also started the sender channel, which automatically started the receiver channel
too.
Creating the message channel using MQSC
Open a command prompt on the receiving machine and follow these steps:
1. Start MQSC by typing the command:
runmqsc QM_APPLE
A message tells you that an MQSC session has started.
2. Define a receiving channel by typing the following command:
define channel(QM_ORANGE.QM_APPLE) chltype(RCVR) trptype(TCP)
A message tells you when the channel has been created.
3. Stop MQSC by typing:
end
Some messages are displayed followed by the command prompt.
Open a command prompt on the sending machine and follow these steps:
4. Start MQSC by typing the command:
runmqsc QM_ORANGE
A message tells you that an MQSC session has started.
5. Define a sender channel by typing the following command:
define channel(QM_ORANGE.QM_APPLE) chltype(sdr) conname('I/P(port)')
xmitq(QM_APPLE) trptype(tcp)
The value con-name is the TCP address of the receiver queue manager.
6. Start the channel by typing the following command:
start channel(QM_ORANGE.QM_APPLE)
7. Stop MQSC by typing:
End
Some messages are displayed followed by the command prompt.
You have now created all the WebSphere MQ objects required for messages to be sent from the sending
queue manager QM_ORANGE to the queue QR.ORANGE on the receiving queue manager QM_APPLE. The
next task is to send a test message.
Putting a test message onto the queue using MQSC
Perform this task on the sending machine (the machine that hosts the queue manager QM_ORANGE.
The amqsput sample program is used to put a message onto the queue that you created.
On Windows the sample programs are installed by default with WebSphere MQ Server or Client. On Linux, the
samples programs RPM need to be installed.
Open a command prompt and follow these steps:
1. Start the amqsput sample program as follows:
o On Linux, change to the /opt/mqm/samp/bin directory and type the command:
./amqsput QR.ORANGE QM_ORANGE
o On Windows, type the command: amqsput QR.ORANGE QM_ORANGE
The following messages are displayed:
Sample amqsput0 start
target queue is QR.ORANGE
2. Type some message text on one or more lines, and then press Enter twice. The following message is
displayed:
Sample amqsput0 end
You have now created a test message and put it onto the remote queue. The next task is to verify that the test
message was received.
Verifying that the test message was sent using WebSphere MQ Explorer
Perform this task on the receiving machine (the machine that hosts the queue manager QM_APPLE).
On the receiving queue manager:
1. In the Navigator view, expand queue manager QM_APPLE.
2. Click the Queues folder.
3. In the Content view, right-click the queue QR.ORANGE, then click Browse Messages... The Message
browser opens to show the list of the messages that are currently on QM.APPLE.
4. Double click the last message in the list to view its properties dialog.
On the Data page of the properties dialog, the Message data field displays the content of the message in
human-readable form.
Verifying that the test message was sent using MQSC
You perform this task on the receiving machine (the machine that hosts the queue manager QM_APPLE). The
amqsget sample program is used to get the message back from the queue.
Open a command prompt and follow these steps:
Start the amqsget sample program as follows:
 On Linux, change to the /opt/mqm/samp/bin directory and type the command:
./amqsget QM.APPLE QM_APPLE
 On Windows, type the command: amqsget QM.APPLE QM_APPLE
The sample program starts, and your message is displayed along with any other messages on this queue. After
a short pause, the sample program ends and the command prompt is displayed again.
END

MQ Basics

Create a QM_APPLE queue manager using WebSphere MQ Explorer/MQSC:-

1. Start WebSphere MQ Explorer.
2. In the Navigator view, right-click the Queue Managers folder, then click New > Queue Manager.
The Create Queue Manager wizard opens.
3. In the Queue Manager Name field, type QM_APPLE.
4. Select the Make this as a default queue manager check box.
5. Click next twice to go to Step 3 of the wizard.
6. Ensure that the Start queue manager check box is selected.
7. Ensure that the Auto start queue manager check box is selected.
8. Click next to go to Step 4 of the wizard.
9. Ensure that the Create listener configured for TCP/IP check box is selected.
10. If the Finish button is not available, type another port number in the Listen on port number field. If the
current value is 1414, try typing 1415 or 1416.
11. Click Finish.

An icon representing this queue manager is displayed in the Queue Managers folder in the Navigator
view of WebSphere MQ Explorer, and the queue manager automatically starts running after you
create it, as shown in the following screen capture:
Creating the queue manager using MQSC
Open a command prompt, and follow these steps:
1. Create a default queue manager called QM_APPLE by typing the command:
crtmqm -q QM_APPLE
Messages tell you that the queue has been created and that the default WebSphere MQ objects have been
created.
2. Start this queue manager by typing the command:
strmqm
A message tells you when the queue manager has started.
3. You must now create a listener by typing the command:
runmqlsr -m QM_APPLE -t TCP -p (port number)
If you do not specify anything with the -p parameter, the default port 1414 is used, but note that you
cannot use the same port number on the sender and receiver, so one could be 1414 and the other 1415 for
example.
Note: You have now created a queue manager with the name QM_APPLE. The next task is to create a
local queue that this queue manager will manage.
Creating the local queue using WebSphere MQ Explorer
1. In the Navigator view, expand the Queue Managers folder.
2. Expand queue manager QM_APPLE.
3. Right click the Queues folder, then click New > Local Queue... The New Local Queue wizard opens.
4. In the Name field, type QL.APPLE
5. Click Finish.

The new queue, QL.APPLE, is displayed in the Content view, as displayed in the following screen capture:
If the queue is not displayed in the Content view, click the Refresh button at the top of the Content view.
Creating the local queue using MQSC
Open a command prompt and follow these steps:
1. Enable MQSC commands by typing the command:
runmqsc
2. Type the following command:
define qlocal (QL.APPLE)
Messages tell you that the queue has been created and that the default WebSphere MQ objects have been
created.
3. Stop MQSC by typing the command:
End
You have now created a local queue called QL.APPLE. The next task is to put a test message to this newly created
local queue.
Putting a test message on the queue using WebSphere MQ Explorer
1. In the Navigator view, expand the Queue Managers folder.
2. Expand queue manager QM_APPLE, which you created in the previous topic.
3. Click the Queues folder. The queue manager's queues are listed in the Content view.
4. In the Content view, right-click the local queue QL.APPLE, the click Put Test Message... The Put test
message dialog opens.
5. In the Message data field, type some text, for example this is a test message, then click Put message. The
Message data field is cleared and the message is put on the queue.
6. Click Close.

In the Content view, notice that QL.APPLE’s Current queue depth value is now 1, as shown in the following
screen capture:
You might need to scroll to the right to view the Current queue depth column.
Putting a test message on the queue using MQSC
The amqsput sample program is used to put a message on the queue that you created.
(On Windows the sample programs are installed by default with WebSphere MQ Server or Client. On Linux, the
samples programs RPM need to be installed.)
Open a command prompt and follow these steps:
1. Start the amqsput sample program as follows:
o On Linux, change to the /opt/mqm/samp/bin directory and type the command:
./amqsput QL.APPLE
o On Windows, type the command: amqsput QL.APPLE
The following messages are displayed:
Sample amqsput0 start
target queue is QL.APPLE
2. Type some message text on one or more lines, then press Enter twice. The following message is
displayed:
Sample amqsput0 end
You have now created a test message and put it onto the local queue. The next task is to verify that the test
message was received.

Verifying that the test message was sent using WebSphere MQ Explorer
1. In the Navigator view, expand the Queue Managers folder, then expand QM_APPLE.
2. Click the Queues folder.
3. In the Content view, right-click QL.APPLE, then click Browse Messages.... The Message browser opens
to show the list of the messages that are currently on QL.APPLE.
4. Double-click the last message to open its properties dialog.
On the Data page of the properties dialog, the Message data field displays the content of the message in humanreadable
form, as shown in the following screen capture:
Verifying that the test message was sent using MQSC
The amqsget sample program is used to get the message back from the queue.
Open a command prompt and follow these steps:
Start the amqsget sample program:
 On Windows, type the following command:amqsget QL.APPLE
 On Linux, change to the /opt/mqm/samp/bin directory and type the following command:
./amqsget QL.APPLE
The sample program starts, and your message is displayed along with any other messages on this
queue. After 15 seconds, the sample program ends and the command prompt is displayed