technology from back to front

RabbitMQ XMPP gateway released

I’m pleased to announce that our XMPP gateway for exposing a RabbitMQ instance to the global XMPP network has been released (documentation, browse or check out code.

Update: Because it depends on a newer release of RabbitMQ than 1.3.0, you will also need to check out the server and codegen code from our public mercurial repositories, or download them as snapshots: server, codegen.

Gateway in relation to ejabberd and RabbitMQ

The mod_rabbitmq module implements an ejabberd extension module which gateways AMQP (as implemented by RabbitMQ) to XMPP.

By bridging between the two systems, we benefit from:

* XMPP’s internet-scale addressing and federation
* XMPP’s presence model
* AMQP’s store-and-forward capability
* AMQP’s routing and filtering (using exchanges and bindings)

The current implementation is a very simple mapping between the two systems. Its simplicity keeps the code short, but only exposes a subset of AMQP features to the XMPP network, and vice versa.

Read more here.

by
tonyg
on
01/07/08
  1. ((I accidentally deleted a bunch of comments I didn’t mean to delete today, so I’m having to repost them manually:))

    Pedro Melo wrote:

    Hi,

    great work!

    Now that ejabberd supports (version 2.x and up) pluggable back.-end’s to their pubsub stuff, are there any plans to make mod_rabbitmq such a module?

    this would allow us to use XEP-0060 (PubSub over XMPP) with RabbitMQ topics.

    Thanks,

  2. ((I accidentally deleted a bunch of comments I didn’t mean to delete today, so I’m having to repost them manually:))

    Mickaël Rémond wrote:

    Hello,

    This sounds like a good idea.
    If you want to, we would be happy to give you an access to ejabberd-modules svn for your ejabberd module gateway code.

    We try to gather as much as possible of the modules developed for ejabberd in this space.

    http://svn.process-one.net/ejabberd-modules/

    Let me know

    –
    Mickaël Rémond
    http://www.process-one.net/

  3. @Pedro: That’s an interesting idea. I haven’t yet had a look to see how difficult it might be, but if pubsub and AMQP can be fit together reasonably smoothly, it would definitely be a good idea to do so.

    @Mickael: Thanks very much. It’s still pretty experimental, and will probably evolve fairly rapidly. Once it settles down a little, we’d be happy to contribute it to the ejabberd community.

  4. The repository seems to be down.

  5. Thanks for the heads-up, Bryan — we’re looking into the problem.

  6. Oops, I broke that while working on something else. Sorry! Fixed now. Bryan – thanks for letting us know.

  7. Glenn Rempe
    on 18/01/09 at 9:54 pm

    Hi. I am having trouble compiling the RabbitMQ XMPP gateway into ejabberd. I am working from the Mercurial trunk for the gateway code (27:944d554c2827), and the ejabberd trunk (r1823) and RabbitMQ trunk (772:75288d1eae96). Erlang is R12B5 on Ubuntu Intrepid.

    Here are the errors I am seeing after I linked the gateway code into the ejabberd src dir and try to re-compile ejabberd:

    And here is the full output as well as the tiny script I am using to help me compile:

    http://gist.github.com/48765

    Can anyone offer any insights? I am not well versed in Erlang so diagnosing the issue is tough for me.

    Thanks!

  8. Hi Glenn — thanks for posting. The mailing-list thread starting here http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-January/003030.html discusses the current problems we’re having getting the XMPP gateway to work. In brief, there’s a mnesia table name clash between RabbitMQ and ejabberd, and we will need to add a unique prefix (e.g. “rabbitmq_”) to all our table names.

  9. Just to clarify, the XMPP gateway is known to work with RabbitMQ 1.4.x; it will not work with 1.5.x (because of the mnesia table name clash); and it will most likely be fixed again sometime before the release of 1.6.0.

  10. Hi tonyg, does the gateway work with the current RabbitMQ 1.7.x?

  11. @jiannis: It should! However, since it’s not an official Rabbit release, you are probably better off taking the “default” branches of both rabbitmq and the xmpp gateway from mercurial, and building them yourself.

  12. To clarify, the problem I mentioned above that affected RabbitMQ 1.5.x with the XMPP gateway has been fixed long ago.

  13. Hi Tony and thanks for the quick response!

    Using RabbitMQ server 1.7.2 after having compiled the gateway code (73c129561101) against ejabberd 2.1.3 and configured as described in the overview document with everything running in localhost. When starting ejabberd though and increasing the log level to debug, modrabbitmq throws an exception in function “exception exit: {{badmatch,{contactingrabbitmq,rabbit@mixer,pang}} in genserver:initit/6″ – rabbit@mixer is the local host.

    Can you offer any insights? Is it a configuration issue or I should be looking elsewhere? I am not familiar with Erlang so tracking down the issue by going through the code is a bit difficult for me. Any pointers on where to look? Looking forward to getting this baby going.. :)

  14. It’s probably an erlang clustering problem. Try either making your ejabberd VM “ejabberd@mixer”, or making your rabbit VM “rabbit@localhost”.

  15. Great, thanks tony!

    It was indeed a configuration issue having to do with the way Mac OS X resolves local hosts – rabbit@machine.local instead of rabbit@machine!

    For anyone trying the same you might want to check out the “-name” and “-sname” arguments of the erlang process that starts the ejabberd and RabbitMQ servers as well as Apple support article HT2385 and make sure that the erlang cookies are the same.

    What actually helped in tracking this down was first getting two erl shells to ping each other!

    Thanks again, lots of love for this product, works great!

  16. Where can I find a copy of mod_rabbitmq? I can’t seem to find it anywhere, the rabbitmq-xmpp repo seems to have disappeared, all the links to it from above don’t work anymore.

  17. Hi Tony,

    I am not able to find xmpp module in rabbit-mq repository http://hg.rabbitmq.com/.

    I checked at https://github.com/rabbitmq/rabbitmq-xmpp but it seems like repository has not been updated for latest version (rabbit mq 2.6)

    Can you please help me out!!

  18. Hi Raj,

    I’m afraid that the XMPP module hasn’t received much love for a while now; I think I was the only one ever really using it, and since I’m no longer with the Rabbit team, it has been sitting on hold. The github URL you give is the best source for the code, but you will likely have a bit of dusting-off and cleaning-up to do to get it to work with recent Rabbits. My own fork https://github.com/tonyg/rabbitmq-xmpp has a couple of commits not present in the official repo, so it might be worth integrating that as well.

    Tony

 
 


− six = 0

2000-14 LShift Ltd, 1st Floor, Hoxton Point, 6 Rufus Street, London, N1 6PE, UK+44 (0)20 7729 7060   Contact us