Dirk
Dirk

Reputation: 1194

How does a Topic Message Driven Bean behave in Websphere 8.5.5 Cluster Environment

What I would like is to run a Message Driven Bean that listens onto a (Websphere MQ7) topic. I would like to deploy my application on a Websphere 8.5.5 Cluster containing two cluster members.

If a message for the topic arrives I would expect that only one of my two MDBs gets the message and process it.

IBM states that I should set identically ClientIds and Subscription Names to ensure that only one instance is able to process a message on a Topic: http://www-01.ibm.com/support/docview.wss?uid=swg21442559

Will the second MDB receive the mentioned MQRC_SUBSCRIPTION_IN_USE Exception, or will the cluster take care that one and only one MDB in the cluster will consume the topic-message?

Maybe someone can point me to the IBM Documentation where this behaviour is defined.

Upvotes: 2

Views: 473

Answers (1)

David Ware
David Ware

Reputation: 301

To allow multiple concurrent instances of an MDB to access the same subscription on an MQ queue manager you can enable "Allow cloned durable subscriptions" in the activation spec for the MDB.

https://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/umj_pasm.html

Running like this means both instances of the MDB will start (no IN_USE errors) and each message for that single subscription will be processed by one instance of the MDB. You would use this to workload balance messages across the multiple WAS servers.

This is only true for durable subscriptions. And only when the MDB instances are connected to the same queue manager.

Upvotes: 5

Related Questions