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>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    3

Package Sidebar

Install

npm i subscription-pool

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • nulltask