↓ Skip to main content

WebSphere MQ JMS message selection

·2 mins

Of my various publications, the one which seems to bring in the most questions at the moment is that relating to message groups in WebSphere MQ and how these are exposed through the JMS API. I should therefore confess that there are a couple of issues with the approach that the article describes.

The first issue relates to what happens when an attempt is made to receive a group but not all of the messages are currently available. The suggestion is made that, after a suitable pause, the receipt of the messages is rolled back and another attempt made. The problem with this is that it means some messages in a group may be rolled back more times that others and, in particular, some may get sent to the backout queue before the others. Consequently, it is necessary to either use message expiry or some cleanup process to ensure that the queue does not fill up with the remaining messages in these groups.

The second issue relates to performance. Message selection imposes a performance overhead. For WebSphere MQ JMS, message selection based solely on message or correlation identifier is performed on the server side. As soon as you start to perform more complex queries or use other properties (such as the JMSGroupID and JMSXGroupSeq used in the article), then the client browses the queue and performs the selection client side. Thanks to Eileen Dreyer in the development team for pointing me to the JMS performance report which, in sections 2.5 and 3.3, provides the information necessary to determine the overhead that selection can add.

Note that for WebSphere Message Broker it is possible to push message selection back to the server side and that the Service Integration Bus in WebSphere Application Server also performs message selection in the messaging engine.

Related

developerWorks roundup

This is my usual weekly roundup of what’s new and interesting on developerWorks. This week we start with something for the WebSphere Application Server developer. When abstracting configuration properties out of code they often end up in a simple properties file. This is fine if the values are static but, if they need updating, you either need to redeploy the application containing the file or else put the file somewhere separate from the application. (If taking the latter approach then the config directory is a good place for the file as then you call leave the application server to replicate it across the nodes.) Perhaps a better approach is to configure a resource environment provider as described in this article, enabling properties to be defined administratively.

High availability of WebSphere MQ link

Today sees the release of WebSphere MQ SupportPac MR01. This provides the source for a WebSphere MQ channel exit which can be configured with a list of host names and port numbers to which the channel will attempt to connect. The intention is that this exit can be used when using a WebSphere MQ link to connect a clustered Service Integration Bus messaging engine to a queue manager. The messaging engine can now failover to another cluster member and the queue manager will still be able to connect.

WebSphere MQ Servers

The final major piece of functionality that I shall cover in this series of posts looking at deliverables made by Hursley in to WebSphere Application Version 6.1 is WebSphere MQ Servers. In Version 6.0 of the Application Server, WebSphere MQ could either be accessed directly from an application using the WebSphere MQ JMS provider or via the service integration bus by using a foreign bus and WebSphere MQ link. In Version 6.1, it is possible to add a WebSphere MQ queue manager, running on z/OS and at Version 6 (CSD 1 or greater), directly as a member of the bus.