hedis icon indicating copy to clipboard operation
hedis copied to clipboard

[feature] PubSub subscribe timeout

Open akaspin opened this issue 13 years ago • 1 comments

Is it possible to add a timeout in subscribe and psubscribe? It would be very convenient for short-lived channels.

akaspin avatar Apr 04 '12 01:04 akaspin

Hi Alexander,

sorry for my late reply, I did not have time to look into your feature request.

Can you describe the use case you have in mind a little further? Do you want to have one timeout for the entire pubSub call, to avoid blocking forever when no client publishes? Or would you like to assign individual timeouts to different channels/patterns?

I think for the former I have a relatively simple solution, but the latter wouldn't be so easy. In my opinion the whole PubSub feature of Redis is a bit messy, semantically speaking. I am absolutely open for API suggestions here, to provide nicer semantics than vanilla Redis.

informatikr avatar Apr 25 '12 17:04 informatikr