0.0.4 • Published 10 years ago

redis-pubsubber v0.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

redis-pubsubber

Redis pub/sub channel wrapper.

  • Messages are serialized to JSON.
  • Allows multiple argumens
  • Includes a callback system.
  • Multiple channels per pub/sub client.

Example

// create pub/sub instance (creates redis pub and sub clients
var redisPubSub = require('redis-pubsubber')('mycloud',6379,'localhost');
// create a channel 
var redisChannel = redisPubSub.createChannel("mychannel");
// listen for messages on channel
redisChannel.on("message", function (firstParam,data,callback) {
  // perform some action, respond by calling callback
});
// publish message to channel 
redisChannel.publish("firstdata",{"some":"data"},function(responseData) {
  // do something with the response
});
0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago