English 中文(简体)
How does a JMS Topic Subscriber in a clustered application server recieve messages?
原标题:

Suppose I created a JMS Topic (PropertiesTopic) with one subscriber (PropertiesSubscriber). PropertiesSubscriber is running in a load balanced application server cluster as shown in the picture below.

alt text http://www.freeimagehosting.net/uploads/be28c03781.png

When a message is delivered to PropertiesTopic, do all the instances of PropertiesSubscriber running on different app servers get that message or does the message get delivered to only one PropertiesSubscriber instance running on an app server determined by the load balancer?

最佳回答

All the instances of PropertiesSubscriber running on different app servers WILL get that message. Even if there are multiple listeners on the same app server for the topic, all the listeners will get the message.

问题回答

JMS 2.0 introduces shared subscriptions. These allow multiple consumers (ex: on different nodes of a cluster) to share a single Topic subscription. Only one of the consumers sharing a subscription will get each message.

To designate multiple consumers as sharing a subscription, they need to use the same sharedSubscriptionName





相关问题
Assets Management in a clustered environment

I have a content management system running on a web server, that among others allows the user to upload assets like images, files, etc to the server. The problem i have is that there will be 2 ...

Condor, Sun Grid Engine, or something else?

I m trying to work out whether we should try out Condor or Sun Grid Engine at work (or possibly something else). We often have lots of unused WinXp workstations. The hope is that we could use wake-...

Caching in a clustered environment

Caching your data in your application code is generally a good idea for many reasons. We have being doing this for quiet some time in our shared environment which includes ColdFusion, .NET, and PHP. ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

热门标签