Discussions

General J2EE: Message Load Balancing

  1. Message Load Balancing (2 messages)

    Dear Java architect

    I'm new in JMS concept and I have a J2SE application and receive messages from ESB channel in pub/sub model.
    However I just wondering how can I implement a load balancing in pub/sub model, as I dun want to all my java instances to process the same thing.

    In IBM MQ have a CLONESUPP model which can serve as only one instance of a durable topic subscriber can run at a time and two or more instances of the same durable topic subscriber can run simultaneously, but each instance must run in a separate Java virtual machine (JVM). If I'm not using IBM MQ as my ESB channel then any other suitable solution can satisfy the above issue? Since this is a J2SE application and I have no idea to form a cluster.


    I would appreciate any help you can provide!

    Thanks in advance
    Bonnie

    Threaded Messages (2)

  2. Message Load Balancing[ Go to top ]

    Bonnie,

    You should consider looking at the more advanced Distributed Caching solutions. Gemstone's GemFire product solves the problem you stated by:

    1. Easily creating clusters based on our technology's Distributed System and Group Membership Services. Use multicast for location transparency or TCP/IP with a lookup service if multicast is not available on your network.

    2. Automatically load-balancing message distribution from a message source (or sources) into an application cluster (J2EE or J2SE). We use "namespace" instead of "topic", but they implemenation is logicaly equivalent (for example, you can use "dot" notation in subject creation).

    3. Giving you the option of statically or dynamically partitioning data distribution (and thus message receipt event firing) within the cluster. You can choose specific primary and backup instances, or let the system dynamically assign these for you.

    4. Guaranteeing that a callback event (equivalent of onMsg()) logically fires once and only once accross your cluster. The major advance in our newest product is that event firing is absolutely guaranteed across any failover boundary condition.

    5. All HA/Failover and load balancing logic is handled by GemFire, both from the publisher and subscriber/cluster perspective.

    So, we take care of clustering, guaranteed messaging, HA/Failover, and load balancing all through one product that's easy to configure and has an intuitive API. There are also many more great features--far to many to list here.

    In fairness, you can get some (but not all) of these feature from some of our competitors as well.

    Cheers,

    Gideon
    gideon dot low at gemstone dot com
    GemFire-The Enterprise Data Fabric
    http://www.gemstone.com
  3. Message Load Balancing[ Go to top ]

    You can't load balance topics via the JMS API; they are not designed for that, but JMS Queues are.

    So instead use a single topic subscriber to publish to a queue (or just use a queue instead of the topic) - then have multiple consumers on the queue and you will get load balancing of the messages on the queue to the different consumers.

    James
    LogicBlaze
    Open Source SOA