FAST and Furious Rupesh's Blog

Wednesday Feb 13, 2008


OpenESB tuning:
    I'm still working on this

GlassFish tuning guide:
    http://wiki.glassfish.java.net/Wiki.jsp?page=PerformanceTuningGuide

JVM tuning guide:
    http://java.sun.com/performance/reference/whitepapers/6_performance.html

Thursday Dec 06, 2007


This is a question I get asked frequently from the field, so I've tried to cover available options in detail. There is more than one way to integrate IBM WebSphere MQ (aka MQ or MQSeries) with JavaCAPS. We'll go over these, along with how to configure each for high concurrency and hence, high performance. 

1. Using the MQSeries eWay

The diagram below shows typical use of MQSeries eWay operations - in this case, from a Business Process

The Connectivity Map for this use case with MQSeries eWay would look like this:
 

 
The concurrency for outbound MQ operations (in this case, put to MQ_RESPONSE) is configurable using the Outbound MQSeries eWay connection pool settings. The default is a maximum of 20 concurrent connections to MQ for the puts.

However, the inbound MQ operation (receive) uses only 1 channel per CM link and a pool size cannot be configured for the number of concurrent listeners (this is due to a limitation in the underlying IBM API where XA will not work when channels are pooled)

To overcome this serial behavior on the inbound side, use multiple MQ eWay links on the connectivity map configured for the same inbound queue (in our example, MQ_REQUEST). In the example below, 3 inbound MQ eWay links are made to the same business process to force 3 concurrent channels (listeners) to the same queue and hence increasing the concurrency 3 folds.
 

 
All 3 links are configured to talk to the same IBM queue and the polling interval was reduced from the default of 5 seconds to every 100ms.
 

 
There are other ways to use the MQSeries eWay for high throughput. For instance, the process could be triggered by a Scheduler and use MQSeries eWay in outbound mode to do a BulkGet operation that gets every message on the queue. However, this requires modifying business logic to enable concurrent processing.

A cleaner approach for configurable concurrency is to use the JMS interface to MQ as seen below.

2. Using JMS JCA

This option uses the default JMS design time artifacts of JavaCAPS and points to IBM WebSphere MQ as the JMS provider. The example below shows the same BP seen earlier, this time redesigned to use corresponding JMS operations instead of the MQ eWay operations.

On the connectivity map, use the JMS Queue or Topic artifacts from the palette. In the case of JMS, the name given on the connectivity map is very important since it signifies the actual name of the IBM MQ queue/topic (In this case, queues named ‘MQ_REQUEST’ and ‘MQ_RESPONSE’)

Concurrency Options

The inbound and outbound concurrency is configured using the standard JMS configuration in JavaCAPS. That is, outbound concurrency via the ‘maximum pool size’ parameter on the outbound link and inbound concurrency via the ‘connection consumer mode’ on the inbound link. When using connection consumer mode for concurrency, the server session pool size allows you to create multiple listeners (default of 5) to the same endpoint.


Configuring IBM WebSphere MQ as a JMS Server

On the Environment, under your logical host, create a new ‘IBM WebSphere MQ’ server to represent your MQ Server as a JMS provider.

Configure the Webphere MQ JMS provider as shown below (details on available configuration options covered below)

When building and deploying to this Environment, make sure that your MQ JMS endpoints (MQ_REQUEST, MQ_RESPONSE) get mapped to the 'WebSphereMQ' server and not to another JMS server (like the default Sun Seebeyond JMS IQ Manager).

Before running this project, there are some IBM runtime dependencies that need to be added. On your app server (Integration Server), add the location to the following jars under “classpath suffix” (can be done using Enterprise Manager or by editing the domain.xml file):
  • com.ibm.mqjms.jar
  • com.ibm.mq.jar
  • com.ibm.mqetclient.jar (if available, needed for XA)
  • dhbcore.jar

These jar files need to be obtained from your IBM WebSphere install location and are not shipped by Sun. After the jar file locations are added to the classpath, a restart will be required so the jars are loaded by the app server.

Configuration options in Environment Explorer

  • IBM MQ Message Server URL:  specifies the host and port of the MQ server in the format “wmq://[hostname]:[port]”
  • QueueManager: specifies both the QueueManager name and all JMSJCA options. It takes the format
    [queue_manager_name]&option1=value1&option2=value2
    Use the xml escaped ampersand (&) as separator between options. Valid JMSJCA options are covered in the next section.
  • TransportType: specifies the MQ transport type. Use “JMSC.MQJMS_TP_BINDINGS_MQ” for Bindings mode (type exactly). For TCP/IP mode, either leave this empty (since default is TCP/IP) or enter “JMSC_MQJMS_TP_CLIENT_MQ_TCPIP”. Note: the difference in underscore versus period between the two values is NOT a typo. The default Transport Type is TCPIP, this is why this option still works even if you did make a typo  (Update: There is a bug in the editor where the TransportType is not automatically appended to the  'wmq://'  URL . So you have to manually append the TransportType to the QueueManager URL as another option. For instance: "QM_rupeshr_tecra&JMSJCA.NoXA=true&TransportType=JMSC.MQJMS_TP_BINDINGS_MQ")
  • Username/Password: specify if required by MQ

JMSJCA Options

A detailed description of all available JMSJCA options, along with additional JMS JCA documentation, is available in your JavaCAPS runtime location as readme files

/logicalhost/extras/JMSJCA-readme.html

/logicalhost/extras/rawmq-readme.html




My name is Rupesh Ramachandran. I work for a team called FAST that does JavaCAPS and OpenESB proof of concepts, reference architectures, field enablement and engineering feedback. My pet projects include JavaCAPS performance tuning, benchmarks and sizing. I came to Sun through the Seebeyond acquisition and have been with Sun for over 6 years.