General J2EE: How to provide failover for a JMS subscriber?
- Posted by: Daniel Chung Yong Lim
- Posted on: March 01 2006 06:46 EST
I have a J2SE application that subscribes to a JMS topic that is maintained by an external party, and performs some action when it receives a message. I now have to provide failover functionality for the application, i.e. to have:
1) two instances of it running in two separate physical servers
2) if both instances are alive and running, everytime when a message is published to the topic, only one instance will act on the message
Will moving my application to J2EE, perhaps by using message-driven bean and by choosing a J2EE application server that does clustering allow me to achieve my objective?
I am quite new to J2EE and would appreciate any feedback.
I'd recommend switching to a JMS provider which suports failover such as ActiveMQ as this kind of thing is much more straightforward to implement inside a JMS provider than on top of it.