Skip to content

XMPP Publish-Subscribe development framework for Junction and Node.js.

License

Notifications You must be signed in to change notification settings

jaredhanson/junction-pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Junction/PubSub

XMPP Publish-Subscribe framework for Node, built on Junction.

Junction/PubSub is a minimalist framework layered on top of Junction, providing robust tooling to applications that need publish-subscribe functionality. The Junction/PubSub architecture is modeled upon the proven pairing of Connect + Express, making development of XMPP applications as simple as that of web applications.

Usage

Create an Application

To create a new application, simply invoke pubsub().

var app = pubsub();

Routing

Junction/PubSub uses the name of the <pubsub/> child element to provide a routing API. For example, an entity may wish to publish to a node:

app.publish('princely_musings', function(req, res, next) {
  // publish item
});

Mount and Connect to XMPP Network

Publish-Subscribe is a protocol that runs over XMPP, along side other extension protocols. Because of this, the pub-sub app is typically mounted as a sub-app of larger XMPP application.

var xmpp = junction()
  .use(junction.logger())
  .use(app);  // use pubsub app in larger XMPP app

xmpp.connect({ jid: '[email protected]', password: 's3cr3t' });

Tests

$ npm install --dev
$ make test

Build Status

Credits

License

The MIT License

Copyright (c) 2011-2017 Jared Hanson <http://jaredhanson.net/>

Sponsor

About

XMPP Publish-Subscribe development framework for Junction and Node.js.

Resources

License

Stars

Watchers

Forks

Packages

No packages published