Contents


Integrating WebSphere Message Broker and WebSphere MQ with IBM Integration Designer using a Service Integration Bus and MQ Link

Comments

This article shows you how to communicate between IBM® WebSphere® Message Broker V7, IBM WebSphere MQ V7, IBM Integration Designer V7.5.1 using a Service Integration Bus (SIBus) engine. The scenario involves adding JMS TargetFunctionName to any incoming message and is designed for multi-operation interfaces that involve invoking BPEL from a message flow using an SIBus. Figure 1 below shows the interaction between the different components. The information goes from Message Broker asynchronously, reaching the SIBus through MQ Link. The business process (BP) is executed with a synchronous call, and the BP response starts the asynchronous response to Message Broker.

Figure 1. Scenario components
Scenario components
Scenario components

Figure 2 shows the most common integration scenario for Message Broker and SIBus:

Figure 2. Integration scenario
 Integration scenario
Integration scenario

Creating a message flow in WebSphere Message Broker

  1. Create a message flow to put an XML message into a WebSphere MQ queue:
    Figure 3. Message Broker message flow
    Message Broker message flow
    Message Broker message flow

Configuring the SIBus

  1. In the WebSphere Application Server Administrative Console, open the URL: http://HOST_NAME:9060/ibm/console and click on SCA.APPLICATION.qCell.Bus:
    Figure 4. Create SIBus
    Create SIBus
    Create SIBus
  2. Under Additional Properties on the right, click on New Destinations:
    Figure 5. Create a destination
    Create a destination
    Create a destination
  3. Select the queue:
    Figure 6. Select queue
    Select queue
    Select queue
  4. Enter ExampleIn for the Name:
    Figure 7. Enter name
    Enter name
    Enter name
  5. Accept the queue assignment to a bus member and click Next.
    Figure 8. Accept queue assignment
    Accept queue assignment
    Accept queue assignment
  6. Click Finish to create the new queue.
    Figure 9. Create new queue
    Create new queue
    Create new queue
  7. Create the JMS Queue Connection Factory:
    Figure 10. Create JMS Queue Connection Factory
    Create JMS Queue Connection Factory
    Create JMS Queue Connection Factory
  8. Accept the default messaging provider:
    Figure 11. Default messaging provider
    Default messaging provider
    Default messaging provider
  9. Enter ConnectionFactory for the Name and jms/ConectionFactory for the JNDI Name. From the drop-down list for Bus name, choose SCA.APPLICATION.qCell.Bus:
    Figure 12. Enter Name and JNDI Name
     Enter Name and JNDI Name
    Enter Name and JNDI Name
  10. Return to Resources => JMS Providers => Default messaging provider:
    Figure 13. JMS providers
    JMS providers
    Figure 14. Default messaging provider
    Default messaging provider
    Default messaging provider
  11. On the right under Queues, click New. Under Configuration parameters, enter ExampleIn for the Name, jms/ExampleIn for the JNDI name, SCA.APPLICATION.qCell.Bus for the Bus name, and ExampleIn for the Queue name:
    Figure 15. JMS providers
    JMS providers
    JMS providers
  12. Under Activation Specifications, click New:
    Figure 16. Activation specifications
    Activation specifications
    Activation specifications
  13. In the General Properties window, the Scope should already be set. Enter Activation Specification as the Name and jms/Activation Specification as the JNDI name. Set the Destination type to Queue and the Destination JNDI name to jms/ExampleIn. For the Bus name, select SCA.APPLICATION.qCell.Bus:
    Figure 17. General properties
    General properties
    General properties

Linking to WebSphere MQ

SIBus Communicates with WebSphere MQ through MQ Link. An MQ Queue Manager appears to be a foreign bus to the Bus, and SIBus appears to be another queue manager to the Queue Manager.

  1. In the WebSphere Application Server Administrative Console, define a foreign bus for the bus:
    Figure 18. Foreign bus
    Foreign bus
    Foreign bus
  2. For Bus connection type, select Direct connection:
    Figure 19. Bus connection type
    Bus connection type
    Bus connection type
  3. For Foreign bus type, select WebSphere MQ:
    Figure 20. Foreign bus type
    Foreign bus type
    Foreign bus type
  4. Set a SCA.APPLICATION.qCell.Bus name, such as the virtual queue manager name, and use the default engine to host the connection:
    Figure 21. Virtual queue manager
    Virtual queue manager
    Virtual queue manager
  5. Define the receiver channel:
    Figure 22. Receiver channel
    Receiver channel
    Receiver channel
  6. Define the sender channel:
    Figure 23. Sender Channel
    Sender Channel
    Sender Channel
  7. Click Finish to save the changes:
    Figure 24. Finish ExampleWPSQMGR
    Finish ExampleWPSQMGR
    Finish ExampleWPSQMGR
  8. Define the foreign queue:
    Figure 25. Foreign queue
    Foreign queue
    Foreign queue
    Figure 26. Foreign queue
    Foreign queue
    Foreign queue
  9. Create a foreign queue with the same name:
    Figure 27. ForeignOut
    ForeignOut
    ForeignOut
  10. Modify the JMS Queue ExampleIn to point to ExampleIn in WPSQMGR3 Bus:
    Figure 28. WPSQMGR3 Bus
    WPSQMGR3 Bus
    WPSQMGR3 Bus
  11. Create a front-end destination named ExampleIn_receive to forward messages to the ExampleIn destination:
    Figure 29. ExampleIn_receive
    ExampleIn_receive
    ExampleIn_receive
  12. Click on the already created ExampleIn_receive and modify the default forward routing path at the bottom of the screen:
    Figure 30. Modify default forward routing path
    Modify default forward routing path
    Modify default forward routing path

Configuring IBM Integration Designer

  1. In the Business Integration view, open the Assembly Editor of ExampleTransformer by double clicking on ExampleTransformer. Set the following properties for Export1 and Import1:
    Figure 31. Assembly Editor Export1
    Assembly Editor Export1
    Assembly Editor Export1
    Figure 32. Assembly Editor Import1
    Assembly Editor Import1
    Assembly Editor Import1
  2. Check the box next to Example_receive and click Mediate:
    Figure 33. Mediate
    Mediate
    Mediate

Configuring WebSphere MQ

  1. Set the following Queue properties in MQ Explorer:
    Figure 34. Queue properties in MQ Explorer
    Queue properties in MQ Explorer
    Queue properties in MQ Explorer

Testing the scenario

  1. Rfhutil is part of Support Pac IH03. From the drop-down list, set the Queue Manager Name to WPSQMGR3 and the Queue Name to Example_receive:
    Figure 35. Testing the scenario
    Testing the scenario
    Testing the scenario
  2. Click Open File and select any XML file:
    Figure 36. Message sample
    Message sample
    Message sample
  3. Before clicking on Write Q , switch to the MQMD tab and set the MQ message format to MQSTR. Then switch back to the Main tab and click on Write Q:
    Figure 37. Set MQ message format
    Set MQ message format
    Set MQ message format
  4. After successful processing of the message, retrieve the response message with Read Q from the local MQ queue named ForeignOut and inspect the result on the Data tab:
    Figure 38. Inspect the result on the Data tab
    Inspect the result on the Data tab
    Inspect the result on the Data tab

Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=861252
ArticleTitle=Integrating WebSphere Message Broker and WebSphere MQ with IBM Integration Designer using a Service Integration Bus and MQ Link
publish-date=03132013