Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

subscription-pool

0.0.1 • Public • Published

subscription-pool

Subscription pooling and abstraction layer for Node.js

Installation

npm:

$ npm install subscription-pool

Example

var Pool = require('subscription-pool');
var Redis = require('subscription-pool/lib/drivers/redis');
var driver = new Redis();
var pool = new Pool(driver);
 
var sub = pool.subscribe('awesomechannelname');
sub.on('message', function(message) {
  // message => { foo: 'bar' }
});
sub.once('subscribed', function() {
  driver.publish('awesomechannelname', { foo: 'bar' });
});

License

The MIT License

Copyright (c) 2014 Seiya Konno <nulltask@gmail.com>

Keywords

none

install

npm i subscription-pool

Downloadsweekly downloads

0

version

0.0.1

license

none

last publish

collaborators

  • avatar