RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Tap Into WebSphere MQ Messaging Using the JMS Interfaces You Already Know : Page 2

Utilize the power of IBM WebSphere MQ messaging middleware by writing your applications to the Java Messaging Services open interface.


Creating MQ Objects: Queue Managers and Queues

A queue is a place to store messages until applications process them. A queue manager owns and manages queues. To create a queue manager and the queues needed for this article, start WebSphere MQ Explorer as follows: Start → All Programs → IBM WebSphere MQ → WebSphere MQ Explorer.

Figure 1 shows how WebSphere MQ Explorer looks when you start it.

Click to enlarge

Figure 1. WebSphere MQ Explorer: WebSphere MQ Explorer is a handy tool for administering WMQ.

Complete the following steps to create a queue manager with MQ Explorer:

  1. In the Navigator view, right-click Queue Managers and then click New → Queue Manage. This starts the "Create Queue Manager" wizard.
  2. On Step 1, enter "TestQM" as the queue manager name and click Next (see Figure 2).

    Click to enlarge
    Figure 2. Create Queue Manager Wizard, Step 1: Enter the queue manager name.
  3. Click Next on the wizard screens for Steps 2 and 3. At Step 4, make sure "Create listener configured for TCP/IP" is checked and the entered port number is free (see Figure 3), and then click Finish.

    Click to enlarge
    Figure 3. Create Queue Manager Wizard, Step 4: Check the port number for the queue manager's listener.

Next, create two queues: IN.QUEUE and OUT.QUEUE. You will write messages to IN.QUEUE and read messages from OUT.QUEUE.

  1. Under TestQM, right-click Queues → New → Local Queue to start the "New Local Queue" wizard.
  2. In the name field, type "IN.QUEUE" (see Figure 4) and click Finish.

    Click to enlarge
    Figure 4. Create Queue Wizard: Enter only the queue name. Leave other attributes set to their default values.
  3. Repeat the above steps to create the OUT.QUEUE.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date