2 Replies Latest reply on Mar 20, 2014 10:50 AM by Motty Cohen

    WildFly broker-less messaging with JGroups

    Motty Cohen Newbie

      Hi All,

       

      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
          Andy Taylor Master

          No as far as I know there isnt a jgroups impl of JMS (although the jgroups forum would know better), in fact since a lot of the JMS spec is centered around durability and acknowledgment of messages it would probably be quite difficult to do. saying that you could partially implement the spec, say just implement simple jms producers and consumers.

           

          If you wanted to use jgroups with MDB's you would have to implement your own Resource Adapter to do this, you could then plug this into Wildfly quite easily, you could take a look at the HornetQ resource adapter or the generic one. One question tho, you say you want a brokerless system but are going to be using Wildfly, cant you just deploy HornetQ in one of the Wildfly instances?

           

          lastly, there is a HornetQ JIRA to implement a peer to peer mode [HORNETQ-87] Peer to peer mode / serverless mode / disconnect mode - JBoss Issue Tracker. This would probably be simpler to implement than a jgroups JMS/new resource adapter implementation.

          • 2. Re: WildFly broker-less messaging with JGroups
            Motty Cohen Newbie

            Hi Andy,

            Thank you for your detailed answer.

            The reason I'm not using HornetQ on the servers is quite simple. I don't want my servers to be aware of each other. I'd like the producer to "publish" a message to a "virtual" group of servers which is dynamic by nature - servers can join and leave the group any time so the JGroups membership concept suits me well.

            Once server from the target group processed the message, it can be publish again to another group and so on. The last processing unit in the chain will send the response back to the caller server (initiator) - by looking at the message payload which specifies the caller name (address).

             

            This way no central broker is required and message producers are not aware of queue/topic location.

             

            Thanks.

            Motty