"Cannot send commands in PubSub mode" error on ping
TarSzator opened this issue · comments
As I understand the sentence
The commands that are allowed in the context of a subscribed client are SUBSCRIBE, SSUBSCRIBE, SUNSUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, PUNSUBSCRIBE, PING, RESET, and QUIT.
I should not get the error
Cannot send commands in PubSub mode
on a ping call with the redis client
Environment:
- Node.js Version: 18.12.1
- Redis Server Version: 7.0.5
- Node Redis Version: 4.5.1
- Platform: Alpine in Docker (Host MacOS 13.0.1 on Apple M1 Max)
this is a known limitation with the current PubSub implementation in the client (which validates PubSub mode on the client side).. it's already fixed in #2344 (which not only "add support for sharded PubSub", but also improves "normal PubSub")
edit:
Hopefully I'll release it this week
Thank you @leibale 😄 So fingers corsed that you get around to it this week 🤞🏼
@leibale Where you able to release?
@TarSzator Unfortenly not, I had to work on something else at the end of last week :(
The features missing in the PR is: PubSub and Sharded PubSub for cluster. if I won't get to it in the next few days I'll release a version without it and implement that in another PR. In the meantime you can install it directly from my fork (make sure to add a postinstall
/prepare
script that will transpile TypeScript (npm run build-all
should work).
Thank you @leibale for the response and the workaround hints.
I like your plan for the release 😃
@TarSzator apparently PubSub & Sharded PubSub + Cluster is a little bit more complicated than I anticipated, but it's almost ready... sorry for all the delays...
@leibale Thanks for keeping this issue up2date.
Still planing to finish PubSub & Sharded PubSub + Cluster
or push this to a later release?
I'll release a version with or without it (depends if I'll finish it in time) tomorrow
@TarSzator I can't release an RC version of redis
with an RC version or @redis/client
without releasing a version for all the sub-packages (because the current "peer dependency" in all the sub-packages does not include RC versions). If you are using @redis/client
directly I can release an RC version of that.
Sorry for all the delays.
I should be able to easily switch to @redis/client
for now. So it would already solve my issue when you for now only release the fix on @redis/client
@TarSzator @redis/client@1.5.0-next.0
is on npm 🎉
@TarSzator have you tried the "next" version? does it work?
@leibale Works fine for me. Thanks a lot. When will you release it as fully?
@leibale Is there an ETA for v1.5.0?
I already missed the "promised" day a couple of times, so I won't make that mistake again...
You can watch #2373 to get updates, the two missing parts are:
- cluster + shared pub-sub (60-70% done)
- tests (5-10% done)
Sorry for all the delays.
edit:
docs is missing as well
Understandable @leibale
No rush, mainly just wanted to understand the next steps.
So I understand that you will release the client when you can also release the complete redis package.
@TarSzator Once #2373 will be ready I'll merge it + (about) 10 more PRs and release them all
@TarSzator just an update.. I'm pretty sure that it works, just need to clean the code a bit + add more tests.. Hopefully my next comment will be after releasing it.. :)
@leibale Thanks a lot for keeping me in the loop
@TarSzator redis@4.6.0
/@redis/client@1.5.0
is on npm 🎉