WebSphere Business Integration Event Broker Configuration

WebSphere Business Integration Event Broker needs DB2 and WebSphere MQ to be installed and running for it to operate. It uses configuration and runtime information stored in DB2 databases, together with queues running in WebSphere MQ, to function as a message broker. The product itself is made of three main components:
Configuration manager
Message broker
Message brokers toolkit

There are several other components but we will use them in this example.

These steps outline what needs to be done to get a simple publish/subscribe broker up and running. This is a very quick run through of the steps needed, offering minimal explanation. For more information refer to the documentation for WebSphere Business Integration Event Broker.

1. Start DB2 on machine 3.

2. When WebSphere Business Integration Event Broker is installed, it defaults to having no licenses available so a broker cannot be started. This count needs to be altered to the number of CPUs that machine 3 has and which are licensed. Open a command prompt and run the command: mqsisetcapacity -c 1

Where, 1 is the number of CPUs.

3. Launch the message broker toolkit by going to Start -> Programs -> IBM WebSphere Business Integration Event Brokers -> Message Brokers toolkit.

4. The toolkit is another eclipse based set of tools and might look familiar. When it opens you will be presented with the Welcome screen. (If this does not appear go to the menu option Help -> Welcome....).

5. On the Welcome screen there is the option to create a default configuration. Select this option as shown in Figure 15-21.

Figure 15-21 The Message brokers toolkit

6. On the first page make sure to use the user name and password that DB2 is installed and running under as this make installation easier. Click Next when done.

7. On the next page, accept the defaults for the queue manager configuration. Make sure to specify a port number that is not used. In this example, as with the other queue managers, the port number chosen was 1415. Click Next.

8. The wizard will then take you through the names of the broker and configuration managers, and their databases, accept the defaults.

9. On the final page click Finish to begin the process of creating all the components and starting them up. This might take a while.

During this process if anything fails then experience has shown that after fixing the problem it is still best to delete the parts that succeeded before re-running the wizard.

10. When everything has been created and started you will receive a success message and you will return to the message broker toolkit.

11. In the broker administrator perspective, in the bottom left view there will now be an active connection shown to the message broker. There will also be an alert message that the default Execution Group is not running. This is shown in Figure 15-22.

Figure 15-22 Connection to the broker

An execution group is the term used by event broker to group a series of message flows. A message flow is a process that describes the steps a message goes through within the broker, including the point at which it arrives. The default execution group is not running because it does not have any message flows deployed to it. A message flow is needed so that Trade3 can use the broker. There is a sample message flow that will do for the purposes of this example. It will also reduce the number of steps needed to get the broker up and running.

12. Go to the menu option Help -> Cheat sheets -> Preparing samples for first use. A new window will open with the message broker toolkit.

13. We have just completed step 1, so go straight to step 2, importing the sample into the workbench. Click the arrow to run this step.

14. You will be presented with a new window, select the Soccer Results Sample and click Finish.

15. Run step 3 in the cheat sheet, creating the runtime resources. Again a window will open, select Soccer Results Sample and click Next. 16. The next panel will show you the names of the queues that will be created. Select WBRK_QM as the queue manager and click Finish. You should receive a message that the create sample queues completed successfully. 17. Run the final step to deploy the soccer results message flow. After selecting the Soccer Results Message Flow and pressing Next you will be presented with options detailing which broker to publish the message flow to. Accept the defaults and press Next, then Next again. 18. Finally you will get to a page asking for the execution group. Enter the Execution Group Name of Trade and click Next. 19. On the last page of this client window check the box next to Soccer Messageflows and click Finish. If an error appears saying that the server cannot be started, just click OK. 20. Close the cheat sheet window. 21. All that is left to do now is to start the message flow. In the Broker Administrator window, under the Broker Administration Navigator, expand Message Flows -> Soccer Messageflows -> (default). Right click SoccerPublish.msgflow and select Run on Server as is shown in Figure 15-23.

Figure 15-23 Running the soccer sample 22. After pressing Finish in the window that appears, you will see that the trade execution group in the domains view will start running. The message broker is now configured and ready for use.

Important: At a later stage, for instance after a reboot, you will need to use the commands mqsistart configmgr and mqsistart WBRK_BROKER from the command line to get the broker running. This should be done after DB2 has been started.

Alternatively you can start the respective services.

To complete the setup of machine 3 you will need to install the TradeRedirector.ear file into the appserver running on this server and also complete the WebSphere MQ configuration.

 

Complete WebSphere MQ configuration for WBRK_QM

The queue manager WBRK_QM still needs to be added to the cluster and some queues defined on it. Follow these steps to complete this:

1. Open a Windows command prompt on machine 3.

2. Go to the directory <MQ_Install_root>\java\bin. For example:
c:\Program Files\IBM\WebSphere MQ\java\bin.

3. Run the command runmqsc WBRK_QM < MQJMS_PSQ.mqsc

This will create all of the necessary JMS queues needed for publish/subscribe.

4. Open the WebSphere MQ explorer.

5. Find WBRK_QM and right-click it. Select All Tasks -> Join a cluster....

6. In the new window that appears click Next.

7. When prompted enter the name of the cluster which is TRADE3. Press Next.

8. The next page will ask for details of the location of a repository queue manager. Select Remote and then enter the queue manager name TRADEQM1 and the connection name of machine1 plus the port, for example machine1(1415). Click Next.

9. Upon successful communication with the remote queue manager the prompt will ask for details about the channels to link the queue managers. Accept the defaults and eventually click Finish.

WBRK_QM has now been added to the cluster. To verify this, take a look at the list of its queues, it should contain references to the TRADE_RESPONSE queues on the other queue managers.

10. Now that the cluster has been created the last queue can be defined. Open the MQ Explorer and expand the WBRK_QM folder.

11. Right-click Queues and select New -> Local Queue.

12. On the General tab of the window that appears enter:
Queue name of TRADE_MAINFRAME
Default persistence of Persistent

13. Change to the Cluster tab. In here select that the queue should be Shared in cluster and enter TRADE3 as the cluster name. For Default Bind select Not fixed.

14. Press OK to create the queue.

This completes the setup for WebSphere MQ, there are request and response queues setup for point-to-point. The appservers will communicate with the broker through the WebSphere MQ cluster facilities. When defining the TCFs later, the name of the queue manager that the broker resides on will be used as well as the local queue manager. This allows messages to be automatically routed to the broker's queues.

 Prev | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.