11 Replies Latest reply on May 29, 2007 12:43 PM by Mark Little

    XMPP integration

    zzzz8 Newbie

      How would one integrate XMPP and JBoss ESB? I'm not very familiar with ESBs, so please correct me if I'm using incorrect terminology, concepts, etc.

      I am building some instant messaging features into my web app. I'm looking to use a JSF / Seam / EJB 3 architecture. I would like to have my JBoss components asynchronously notified with new XMPP messages via JMS. Thus, I'd like to have the ESB handle the incoming and outgoing XMPP messages (i.e. keep open and close, if necessary, XMPP connections). Or maybe in this case, JMS may not be necessary when Seam incorporates JBoss ESB functionality in an upcoming release. Anyway, how would I be able to do this? It would also be nice to use the Smack XMPP implementation and API to accomplish this integration... Any assistance or advice would be helpful.

        • 1. Re: XMPP integration
          Kurt Stam Master

          We've actually been wanting to have a jabber gateway for the kind of stuff you are describing. So there is your answer, help us build a XMPP based gateway to bring your messages into the bus. We really should have a doc on what it takes to make a gateway, but we don't. So if your interested to help out, then we will help you out, and maybe we can nail down both :).

          Like you are already suggesting we can use Smack or some other implementation and simply add a wrapper around it. It's actually pretty straight forward. Join our dev-list and we'll get you going.

          --Kurt

          • 2. Re: XMPP integration
            Burr Sutter Master

            I'm not sure why JMS is in your solution.

            And it is unclear when Seam will offer ESB support (from a service producer perspective). We are hoping to see Seam first embrace the concepts of async invocation capabilities as well as something like REST or SOAP.

            Burr

            • 3. Re: XMPP integration
              zzzz8 Newbie

              As to why JMS is in my solution, that's a really good question. I thought that for EJBs, asynchronous messaging is dealt with using JMS-MDBs... If I'm wrong or if you have additional suggestions, please let me know. Obviously, I'm a newbie to this ESB/XMPP/JMS stuff. :)

              • 4. Re: XMPP integration
                Burr Sutter Master

                The ESB is async by default regardless of the transport used. However, I personally like JMS as my typical transport instead of FTP or SOAP or whatever.

                Ideally you would replace the JMS gateway/listener concept with a XMPP gateway that you create. :-) Or anyone else from the community who would like to work on this item!

                Burr

                • 5. Re: XMPP integration
                  Mark Little Master

                   

                  "burrsutter" wrote:
                  The ESB is async by default regardless of the transport used. However, I personally like JMS as my typical transport instead of FTP or SOAP or whatever.


                  Just remember: until we add AMQP support, JMS isn't interoperable though ;-)

                  • 6. Re: XMPP integration
                    zzzz8 Newbie

                    In terms of the XMPP gateway, does this have anything to do with JCA 1.5? Also, I guess MDBs don't have to use JMS - I guess that's where JCA 1.5 comes in. I've been reading a little about that and am wondering if the gateway would implement JCA 1.5 - or does JBoss ESB do something different?

                    • 7. Re: XMPP integration
                      Mark Little Master

                      A gateway is meant to bridge between the ESB-aware and ESB-unaware worlds. So for example using XMPP from the "outside" world and then JMS within the ESB world, you'd have a gateway/bridge. As Kurt suggested, you could write the gateway using the approach we've got within the core. Or you could use JCA. Take a look at http://jira.jboss.com/jira/browse/JBSEAM-658 for some ideas.

                      If you're more interested in using XMPP within the ESB (ESB-aware to ESB-aware communication), then you'd need to look at defining an EPR for XMPP as well as a courier.

                      • 8. Re: XMPP integration
                        gregorypierce Newbie

                        To be honest, I would suggest that anyone looking to do XMPP->JMS with ESB or any other mechanism that has messaging architecture flexibility do so by integrating with ActiveMQ. ActiveMQ already has all this functionality built in, and leveraging that as opposed to starting from scratch seems to be something that would make sense in the long run.

                        • 9. Re: XMPP integration
                          Mark Little Master

                          Sure, if you can use ActiveMQ. However, there are some places where specific software packages (both commercial and open source) aren't allowed. So while in the short term I think your suggestion seems good, in the longer term we may have to look at native support.

                          • 10. Re: XMPP integration
                            gregorypierce Newbie

                            Well if you're going to do that, at least do yourself a favor and use Smack (http://www.igniterealtime.org/projects/smack/index.jsp). To do anything else will result in considerable pain and suffering as the XMPP protocol is pretty meaty to implement, and Smack is Apache licensed so it wouldn't incumber the project.

                            • 11. Re: XMPP integration
                              Mark Little Master

                              Thanks. As I said, not likely to happen from our side until after 4.2, but I've created a task so people can track. http://jira.jboss.com/jira/browse/JBESB-585