Best XMPP client library for Node.js

Denti picture Denti · Nov 1, 2011 · Viewed 25.1k times · Source

What are your experiences with Node.js XMPP client libraries? What do you recommend?

Answer

Jared Hanson picture Jared Hanson · Nov 1, 2011

I would highly recommed node-xmpp, which is the most idiomatic library available for Node, in that each connection is an EventEmitter which emits events in a similar manner to the built in modules.

If you are coming at Node from a browser-based background, the way stanzas are constructed is identical to Strophe.js, which minimizes the learning curve.

As you venture further into XMPP territory, node-xmpp is also a great way to write components. And its architecture is clean enough that there is even an xmpp-server project being built on it.

Finally, I'm also developing Junction, which is a suite of XMPP middleware, similar in style to what Connect/Express offers for HTTP. I'm currently building out examples and additional documentation, but the source code has full API docs, and I think its a solid framework, particularly if you are incorporating various XEPs into your client/component.