WebSphere WebSphere Application Server Version 6.1.x Feature Pack for Web Services Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

Workload sharing with publish/subscribe messaging

You can set whether durable subscriptions are shared between subscribers in a cluster.

If you use nondurable subscriptions for publish/subscribe messaging, all subscribers receive a copy of each matching publication. If you use durable subscriptions for publish/subscribe messaging, and there are multiple consumers, you can control whether all subscribers receive all matching publications, or whether each matching publication is received by one subscriber.

For example, when durable subscriptions are used to handle incoming requests, the incoming publications can be divided between the subscribers to spread request workload across a cluster of subscribers, instead of every subscriber receiving every publication.

A durable subscription has a home messaging engine within a bus, which manages the state of the durable subscription using a localization point, similar in principle to a queue destination. This localization point cannot be partitioned across a cluster.

Because the subscribers (which typically may be message-driven beans) are in a cluster they are likely to be using the same Connection Factory, so will have the same client identifier. In general, two clients trying to use the same client identifier and subscription name would be treated as an error condition, but for durable subscriptions, you can control whether multiple clients with the same client identifier are treated as instances of the "same" consumer or whether they represent a configuration error. This is controlled using the Share durable subscriptions attribute of the Connection Factory that is used by the clients.

A shared durable subscription is one which can be simultaneously accessed by multiple cooperating clients. Because the clients are treated as cooperating rather than contending, each message is delivered to one client. You can use a shared durable subscription when an application that subscribes to a topic is deployed to a cluster, so that the application receives only one copy of each message. Without a shared durable subscription, the application would receive the message once for each server in the cluster.

If clients are not allowed to share the durable subscription, the bus will not accept an attempt by a client to create a consumer session to a durable subscription that is already in use, even if the client has the same client identifier as the one that already has a consumer. This occurs when the Share durable subscriptions property is set to "never", or when the Share durable subscriptions property is set to "in a cluster" and the client attempting to create a consumer session is not running in a cluster. In these circumstances, concurrent access is disallowed.

Restriction: In the WebSphere default JMS provider, it is not possible to workload balance publish/subscribe messages for a topic space in a cluster. There are two possible workarounds for this limitation:
Related concepts
JMS connection factories and service integration
Related tasks
Configuring shared durable subscriptions

Concept topic

Terms of use | Feedback


Timestamp icon Last updated: 27 November 2008
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.pmc.wsfep.multiplatform.doc/concepts/cjt0015_.html

Copyright IBM Corporation 2004, 2008. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)