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.
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:
- In the Navigator view, right-click Queue Managers and then click New → Queue Manage. This starts the "Create Queue Manager" wizard.
- On Step 1, enter "TestQM" as the queue manager name and click Next (see Figure 2).
Figure 2. Create Queue Manager Wizard, Step 1: Enter the queue manager name. |
- 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.
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.
- Under TestQM, right-click Queues → New → Local Queue to start the "New Local Queue" wizard.
- In the name field, type "IN.QUEUE" (see Figure 4) and click Finish.
Figure 4. Create Queue Wizard: Enter only the queue name. Leave other attributes set to their default values. |
- Repeat the above steps to create the OUT.QUEUE.