node.js - Redis pub/sub limit -


using redis pub/sub, there way limit number of listeners redis publish to?

http://redis.io/commands/publish

for example, using node.js parlance:

var redis = require('redis'); var rcpub = redis.createclient(); var rcsub = redis.createclient();  rcpub.publish('channel','messagea',{limit:1}); //desired functionality/syntax 

basically, when send messagea redis, want tell redis publish message 1 listener/subscriber. seems possible, can redis this?

in redis docs, command is:

publish channel message 

what looking is:

publish channel message limit 

where limit integer. seems reasonable, , easy implement redis' perspective.

you can add channel per subscribed, , publish single user's channel when need communicate him.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -