Howto: Clustering JMS with JOnAS


Authors : Yannick Braeuner, Benoit Pelletier
February 12, 2008
Version : 2.0

 

Introduction

Load balancing

                JORAM distributed configuration

                Why use clustered Topic?

                General scenario for Topic

                What's Load-balancing for Queue

                First scenario for Queue : distribution of the load at the server side

                Second scenario for Queue : load-balancing at the client side

JORAM HA and JOnAS

MDB Clustering

       

Introduction

Generalities about Clustering JMS

The JMS API provides a separate domain for each messaging approach, point-to-point or publish/subscribe. The point-to-point domain is built around the concept of queues, senders and receivers. The publish/subscribe domain is built around the concept of topic, publisher and subscriber. Additionally it provides a unified domain with common interfaces that enable the use of queue and topic. This domain defines the concept of producers and consumers. The classic sample uses a very simple configuration (centralized) made of one server hosting a queue and a topic. The server is administratively configured for accepting connection requests from the anonymous user.

JMS clustering aims to offer a solution for both the scalability and the high availability for the JMS accesses. This document gives an overview of the JORAM capabilities for clustering a JMS application in the J2EE context. The load-balancing and fail-over mechanisms are described and a user guide describing how to build such a configuration is provided. Further information is available in the JORAM documentation here.

Configuration

The following information will be presented:

Getting started :

Load balancing

JORAM distributed configuration

Two instances of JOnAS are configured ("J1" and "J2"). Each JOnAS instance has a dedicated collocated JORAM server: server "S1" for JOnAS "J1", "S2" for "J2". Those two servers are aware of each other.

Set a JORAM distributed configuration: