Author |
Message
|
Volvic |
Posted: Mon Feb 20, 2012 6:29 am Post subject: Consuming Published Messages in a WebSphere Cluster |
|
|
Apprentice
Joined: 14 Oct 2009 Posts: 30
|
Hi there,
we have a pattern kind of problem here.
We run 4 IBM WebSphere Application Server applications here which are all the same, they are clones. They all subscribe to one topic X. The problem is that all 4 app servers process the same messages (so each message 4 times) and we only want to process different messages only once by the whole 4 app server cluster.
How can we achieve that? If we create manage subscription into a queue (which enables us to process each messages once by one of the 4 clones) then the subscription filter cannot be changed dynamically by the application for subscriptions (which is the reason why this cannot be our solution).
Any idea? _________________ Volvic
Last edited by Volvic on Mon Feb 20, 2012 9:42 am; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 20, 2012 7:35 am Post subject: Re: Consuming Published Messages in a WebSphere Cluster |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Volvic wrote: |
Hi there,
we have a pattern kind of problem here.
We run 4 WebSphere Application applications here which are all the same, they are clones. They all subscribe to one topic X. The problem is that all 4 app servers process the same messages (so each message 4 times) and we only want to process different messages only once by the whole 4 app server cluster.
How can we achieve that? If we create manage subscription into a queue (which enables us to process each messages once by one of the 4 clones) then the subscription filter cannot be changed dynamically by the application for subscriptions (which is the reason why this cannot be our solution).
Any idea? |
Yes, have a unique mutable subscription. Use the Cluster ALIAS as subscription distribution qmgr.
Your messages will be load balanced through the cluster and arrive only once... However the change of the subscription filter by one application will affect the 3 others...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Volvic |
Posted: Mon Feb 20, 2012 9:41 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2009 Posts: 30
|
Well the problem is that a subscription which forces the queue manager to deliver messages into a queue is managed, isn't it? That is why applications are not able to change/alter it in order to, for example, set specific filters on messages. _________________ Volvic |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Feb 20, 2012 10:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
right, so, you are trying to use Publish Subscribe to not receive multiple copies of messages to the same subscription.
The problem is, that's not actually publish and subscribe! That's regular distributed queueing.
If you have 4 subscriptions, you will always get 4 copies of every publication. That's the *point* of pub/sub. |
|
Back to top |
|
 |
Volvic |
Posted: Mon Feb 20, 2012 11:02 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2009 Posts: 30
|
The application on WebSphere is just one of many subscribers (receiving systems). It is just that it is deployed on 4 app servers in order to process more messages at once and do lots of other things at once.
Our Devs want to achieve the goal without changing the app on the 4 app servers and without changing the publisher app  _________________ Volvic |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Feb 20, 2012 11:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Even if you changed the config on the app servers to all point the subscription to the same queue on the same qmgr, you will still get 4 copies because they've still created 4 subscriptions.
You simply can not change this - if the app is going to create a new subscription for ever instance of the app, then every instance of the app is going to get *all* of the subscriptions.
Again, that's the *job* of pub/sub. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 20, 2012 6:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Volvic wrote: |
Well the problem is that a subscription which forces the queue manager to deliver messages into a queue is managed, isn't it? That is why applications are not able to change/alter it in order to, for example, set specific filters on messages. |
Looks like you only read part of my response.
- Set the delivery queue to the clustered queue, set the delivery qmgr to the cluster alias.
- Make sure that any of the appservers can change/update the subscription (should be part of the way you create the subscription
- Downside => changing the subscription from a single appserver changes it for all of them...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|