pub sub handler 消息上带有ObjectKey的Redis PubSub
酒馆子处理程序这是为了与Redis一起用作发布/订阅处理程序而编写的。它只是一个旨在帮助管理套接字的包装器。设置: var psh = require( 'pub-sub-handler' )( { host: localhost, port: 6379 }, function( channel ){ // Called when the backend Redis makes a subscription };订阅: psh.subscribe( 'channel-name', 'key', object, function( channel, key, object, message ){ // Called when a message is published to the specified channel };出版: psh.publish(
用户评论