Posted on

Configuring Websphere default JMS broker

websphere jms broker

This excerpt from the Enter­prise Appli­ca­tion Server Cook­Book that will teach how to configure the default JMS broker for Websphere application server.

If you want to fully understand the complex topics contained in this chapter we need to make sure that you have a basic knowledge of JMS core elements:

  • A Connection Factory is an object that a JMS client (a Java program that uses the JMS API) uses to create a connection with a JMS provider.
  • A JMS queue is a staging area that contains messages that have been sent and are waiting to be read (by only one consumer). Note that, in contrast to what the name “queue” suggests, messages don’t need to be delivered in the order sent. A JMS queue only warranties that each message is processed only once.
  • A JMS topic is a distribution mechanism for publishing messages that are delivered to multiple subscribers.

When using the default JMS provider your JMS Connection Factories will connect to a Service Integration Bus (SiBus), which hides the actual JMS implementation from the application. Applications then use queues within the SiBus to send and receive messages. At the same time, the JMS Topics are persisted in the SiBus and accessed through appropriate Connection Factories, which applications use to gain access to the Bus.

In order to create a JMS Connection Factory using the Default Provider you need at first create a Service Integration Bus which will act as a proxy between your messaging engines.

Connect to the Admin Console and choose Service Integration > Buses. Click on “New”. The new Bus wizard will start. In Step 1 enter the name of your Bus:

websphere jms broker 

If you have checked the Bus security option you will ensure that client applications authenticate to the bus and the authorization policy for the Bus is enforced. This will add some additional screen shots for specifying which security domain to use for securing your Bus. Please refer to the Chapter 11 for learning how to create a security domain).

Click on Next. In Step 2 you will be requested to confirm the creation of your Bus. Once confirmed, the Bus will be enlisted in the Bus summary page as shown by the following picture:

websphere default jms broker 

To complete the configuration of the SiBus, we must add an existing server as a member to the SiBus so that we have a facility for message persistence.

In order to do that, click on the “JMSBus” just created and, within the Topology section, click Bus members, as shown by the following screenshot:

websphere default jms broker 

You will now be presented with a screen where you can add Bus members.

By clicking Add and you will be able to select the server you wish to add as a member to the Bus. You will notice that the Server option is already pre-selected, as shown in the following screenshot:

websphere default jms broker


Click Next to proceed to the final screen, where you will choose the message persistence option between File store and Data store (the first one will persist your messages on a file system, the second one obviously on a database):

websphere default jms broker

The next screen will be dependent on your message store. Supposing that you have selected “File Store”, in the next step you will be able to configure the File Store properties:

websphere default jms broker

Click Next. In the following screen you will be able to tune performance parameters by choosing an appropriate JVM heap size; in the following screen we have just left the default values:

websphere default jms broker 

Clicking Next again will take you to the Summary page where you can review your configuration. Click Finish and Save to retain the changes.

You will now see the application server called server01 listed as a Bus member. At this point, the server must be restarted in order to activate the SiBus message engine. In the next recipes we can start configuring JMS resources on the top of it.