|
Replies:
2
-
Last Post:
Nov 7, 2007 2:51 PM
by: whartung
|
|
|
|
|
|
|
Publishing data to all instances in a cluster
Posted:
Nov 7, 2007 2:14 AM
|
|
|
|
|
Hi,
In a clustered environment I need to publish data to all instances in the cluster. What is the best way to do it?
The use case is for the requirement is to be able to process an external rate feed, which will be done by only one of the instances and then make that available in all instances. The external feed is parsed every 10-15 seconds.
Using JMS and a Topic seemed like a solution, but glassfish only invokes one MDB for a message so the change will not be propogated to all instances.
Thanks, SM
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [att1.html]
|
|
|
|
|
|
|
Re: Publishing data to all instances in a cluster
Posted:
Nov 7, 2007 2:52 AM
in response to: Shyamal Mehta
|
|
|
Hi
I will let others answer the rest of the question.
> Using JMS and a Topic seemed like a solution, but glassfish only invokes > one MDB for a message so the change will not be propogated to all instances.
The default OpenMQ resource adapter,as you rightly pointed out, implements a "shared" [across all instances in the cluster] topic subscription and hence an incoming message from a Topic is delivered to only one instance in the cluster. There is no way to disable this. [http://docs.sun.com/app/docs/doc/819-7755/6n9m8u5nc?a=view#aeooq]
If you still want to have "unshared" topic subscriptions in GlassFish, you might want to look at Generic JMS RA, available at http://genericjmsra.dev.java.net and bundled in GlassFish, and configure shareClientId property in your MDB's ActivationSpec to false. http://fisheye5.cenqua.com/browse/genericjmsra/src/java/com/sun/genericra/inbound/ActivationSpec.java?r=1.6#l324
If you feel that OpenMQ should fix this to provide a mechanism to disable shared subscriptions in a cluster, please feel free to raise a RFE in the OpenMQ issue tracker.
Thanks --Siva.
Shyamal Mehta wrote: > > Hi, > > In a clustered environment I need to publish data to all instances in > the cluster. What is the best way to do it? > > The use case is for the requirement is to be able to process an external > rate feed, which will be done by only one of the instances and then make > that available in all instances. The external feed is parsed every 10-15 > seconds. > > Using JMS and a Topic seemed like a solution, but glassfish only invokes > one MDB for a message so the change will not be propogated to all instances. > > Thanks, > SM > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net For additional commands, e-mail: users-help@glassfish.dev.java.net
|
|
|
|
|
|
|
|
Re: Publishing data to all instances in a cluster
Posted:
Nov 7, 2007 2:51 PM
in response to: Sivakumar Thyag...
|
|
|
Boy I'll bet the discussions over how to do this must have been really entertaining to watch.
On the one hand, the Cluster is a "single" thing, so why should each instance get a copy of the message from the Topic. Rather, each instance gets a distinct message, and the cluster processes message N times faster (with N being the number of instances in the cluster).
On the other, it's a bunch of loosely cooperating instances where something like a Topic would make complete sense to be used as a mechanism for sharing information across them.
Yea, I bet those were good times. Someone didn't walk away happy from those .
|
|
|
|
|