Configure the queue manager and broker for an application that connects to an IBM MQ queue manager

Before we can run an application that connects to an IBM MQ queue manager, we must configure the queue manager. For a publish/subscribe application, some additional configuration is required if we are using Queued publish/subscribe interface.


Before starting

XMS works with IBM Integration Bus or WebSphere Message Broker Version 6.1 or later

Before starting this task, carry out the following steps:

  • Make sure that the application has access to a queue manager that is running.
  • If the application is a publish/subscribe application and uses Queued publish/subscribe interface, make sure that PSMODE attribute is set to ENABLED on the queue manager.
  • Make sure that the application uses a connection factory whose properties are set appropriately to connect to the queue manager. If the application is a publish/subscribe application, make sure that the appropriate connection factory properties are set for using the broker. For more information about the properties of a connection factory, see Properties of ConnectionFactory.


You configure the queue manager and broker to run XMS applications in the same way that you configure the queue manager and queued publish/subscribe interface to run IBM MQ JMS applications. The following steps summarize what we need to do.


Procedure

  1. On the queue manager, create the queues that the application needs.

    For an overview of how you create queues, see Defining queues.

    If the application is a publish/subscribe application and uses Queued publish/subscribe interface that needs access to IBM MQ classes for JMS system queues, wait until Step 4a before creating the queues.

  2. Grant the user ID associated with the application the authority to connect to the queue manager, and the appropriate authority to access the queues.

    For an overview about authorization, see Securing. If the application connects to the queue manager in client mode, see also Clients and servers.

  3. If the application connects to the queue manager in client mode, make sure that a server connection channel is defined at the queue manager and that a listener is started.

    You do not need to perform this step for each application that connects to the queue manager. One server connection channel definition and one listener can support all the applications that connect in client mode.

  4. If the application is a publish/subscribe application, and uses Queued publish/subscribe interface, perform the following steps.
    1. On the queue manager, create the IBM MQ classes for JMS system queues by running the script of MQSC commands that are supplied with IBM MQ. Make sure that the user ID associated with the IBM Integration Bus or WebSphere Message Broker has the authority to access the queues.

      For information about where to find the script and how to run it, see Use IBM MQ classes for Java.

      Perform this step only once for the queue manager. The same set of IBM MQ classes for JMS system queues can support all XMS and IBM MQ classes for JMS applications that connect to the queue manager.

    2. Grant the user ID associated with the application the authority to access the IBM MQ classes for JMS system queues.

      For information about what authorities the user ID needs, see Use IBM MQ classes for JMS.

    3. For a broker of IBM Integration Bus or WebSphere Message Broker, create and deploy a message flow to service the queue where applications send messages that they publish.

      The basic message flow comprises an MQInput message processing node to read the published messages and a Publication message processing node to publish the messages.

      For information about how to create and deploy a message flow, see the IBM Integration Bus or WebSphere Message Broker product documentation available from the IBM Integration Bus product documentation library web page.

      You do not need to perform this step if a suitable message flow is already deployed at the broker.


Results

We can now start the application. Parent topic: Set up the messaging server environment