Node-redis: [question] Prefix option + subscribe command

Created on 10 Nov 2017  ·  3Comments  ·  Source: NodeRedis/node-redis

  • Version: node_redis : 2.8.2 // redis : 3.2.7
  • Platform: Linux Alpine, node v8.5.0
  • Description:

Hey,

I have a question about the prefix option. Is it supposed to prefix channel names when using the subscribe command?

At the moment it does not seems to prefix the channel name.

In my use-case it is at odds with my PHP client predis that does prefix channels name when using the publish commands.

Thanks for your help & your time

question

Most helpful comment

Yes indeed, I did it this way - I was just surprised of the unexpected (imho) behavior.

Thanks!

All 3 comments

No, the channel name is not prefixed. Only the keys are prefixed. I think this behavior is unlikely to change since it would brake a lot of existing clients.

@Atala You can easily implement this on your own by wrapping this feature and prepending the prefix to channel names. For reference, see this commit https://github.com/yss14/node-redis-eventbus/commit/8930897ca2c5bf0e71dad0483a1d8e4367e97644

Yes indeed, I did it this way - I was just surprised of the unexpected (imho) behavior.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mickael-van-der-Beek picture Mickael-van-der-Beek  ·  6Comments

strumwolf picture strumwolf  ·  4Comments

dotSlashLu picture dotSlashLu  ·  5Comments

ghost picture ghost  ·  3Comments

betimer picture betimer  ·  5Comments