3 Replies Latest reply on Mar 21, 2014 2:35 AM by belaban

    WildFly broker-less messaging with JGroups

    motty.cohen

      Hi All,

       

      I hope this is the place for the following question:

       

      I want to implement a broker-less messaging architecture (TIBCO RV / ZeroMQ style) among group of WildFly servers (each of which in a standalone mode).

      The use case is to publish a message from one server (from group A of servers) to a group B of servers that only one of them will process it and return the response to the calling server.

      The system is not mission critical, it can tolerate some degree of message lose (Guaranteed delivery is not a must). Also, ordering is not important.

       

      HornetQ is not suitable for me since it requires a server to manage queues and topics (broker).

      I thought of using JGroups for this purpose but I'd like to use JMS 2 interface and MDB mechanism in the application server.

       

      Is there any JGroups implementation of JMS (1.1 / 2.0) spec that I can use with WildFly 8.0?

      Any ideas of how to implement this architecture in WildFly will be highly appreciated.

       

      Thanks,

      M.

        • 1. Re: WildFly broker-less messaging with JGroups
          belaban

          Hi Motty,

           

          if this is a master-slave task distribution system, where tasks need to be processed by different cluster nodes, but one task can only be processed by one node, then something like [1] might be helpful. This is not JMS, however.

           

          A couple of years ago, we once implemented a JMS API over JGroups, but left filtering out. Not too difficult, unless you want a complete 100% impl of JMS.

           

          Ping me on IRC (#jgroups) if you want to discuss this interactively.

          Cheers,

           

          [1] http://www.jgroups.org/taskdistribution.html

          • 2. Re: WildFly broker-less messaging with JGroups
            motty.cohen

            Hi Bela,

             

            I've looked at your article "A Simple Clustered Task Distribution System" and it is the exact use case I'm trying to implement.

            But I don't want the code to be bounded to specific JGroups implementation. I'd like to use the application server MDB mechanism and use annotations to subscribe to message. First, I was hoping to find JMS reference implementation based on JGroups but couldn't find one. I thought of implementing one but after diving into the code I realized it might be too much work especially when I need very limited JMS capabilities.

            Then I understood that maybe I don't need JMS implementation to use MDB mechanism, just to implement a resource adapter but since I'm not familiar with it, I need to dive into it.

             

            I'd like to discuss this issue but I've never used IRC so I'm not familiar with the details: what server to connect, how to search for group etc`.

             

            Motty.

            • 3. Re: WildFly broker-less messaging with JGroups
              belaban

              I understand the need to be independent from a specific API such as JGroups.

              You could define your own API which allows you to use either JGroups or JMS, and makes you independent from both. At the end of the day, there are only a few methods you need to use from JGroups, e.g. create, connect, send/receive, viewAccepted, disconnect, so this should be simple to abstract away.

              The IRC chat room is #jgroups at irc.freenode.net.

              Cheers,