Question

I have a MDB deployed on Jboss that gets messages from a Websphere MQ queue,looking in each message header for GroupId and Sequence information.Once it gets all sequences for a group,puts together the payload of each message it received to form one big message and sends it to another system.

Now the MDB will be deployed in a Websphere Application Server 7 clustered environment and I don't know for sure if there is any caching/configuration available to gather all message sequences for a group by one instance of the cluster(otherwise,if one instance receives some message parts and another instance the rest,in the end the MDB won't be able to put together one big message)

I read that the jms-ra resource adaptor can be configured with con.sun.genericra.loadbalancing.selector= (e.g JMSType = 'Instance1' and so on for the other instances) The JMSType header should be present in the message and should be 'Instance1', for instance 1 to process this message.

But I'm not sure if the system that will put the messages in the queue from where the MDB picks them up will send such information in their message headers.

Is there a way to configure the cluster to achieve this?

No correct solution

OTHER TIPS

When working in cluster environment, MDBs work independently. There are several ways to achieve syncronization.

1) You can use selectors to divide message flows between cluster nodes. Here is the docs http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzal.doc%2Ffg20180_.htm The main problem is that selectors need some info in message properties to make their job. Somebody must put them there.

2) You can make syncronization on "shared" data collector, such as DB. You will put received messages there. Further processing can be made async or on last message come basis.

3) You can make a "proxy" yourself. You can make additional "internal" queue. Take messages by several MDB from external queue, anylize them and put properties needed for point 1. Then put messages in internal queue and read them as in point 1 using selectors by different nodes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top