Search code examples
webspherewebsphere-libertyopen-liberty

IBM Liberty message consumption with fail-over


We are designing a solution that will consume messages from IBM MQ using JMS. The plan is to use WAS Liberty, so JMS is the technology of choice. We will create Message-Drive beans that will listen for messages in MQ queues.

We are considering both WAS Liberty and OpenLiberty as well.

The trick here is that we must implement it with fail-over, so that if one of our server fail, the other will keep consuming messages from MQ automatically. Like in a ative/passive mechanism.

I'm aware that the MQ adapter needs to be installed as it is not provided out-of-the-box.

I have the following questions:

  1. Does WAS Liberty messaging implementation supports fail-over? Meaning that if the ative message consumer node fails, the stand-by node will automatically migrate and start consuming messages from MQ? What about OpenLiberty?
  2. How can I configure the message system to work that way? Can you point out to the documentation?

Or is this feature only provided by WebSphere?


Solution

  • There is no such functionality in WebSphere Liberty or Open Liberty yet. You can create RFE here https://www.ibm.com/developerworks/rfe/?PROD_ID=544 . There are ways to do it manually, check these links:

    Solution that you could do:

    • create a script/application that will monitor your servers and call that API to enable/disable endpoint in specific server
    • or use Dynamic cluster/ auto scaling feature of Liberty and divide you app to two clusters - one with MDBs, one without. And then define policy that MDBs cluster has 1 instance always available. So once the server dies it is automatically restarted somewhere in the cluster
    • or use Kubernetes/ICP platform in the same way - so deploying 2 versions of app, and defining different replicasets parameters.