mloughran / em-hiredis

Eventmachine redis client
MIT License
221 stars 63 forks source link

pubsub command #37

Open adityagodbole opened 9 years ago

adityagodbole commented 9 years ago

The client uses the pubsub method to create and return the pubsub client. This masks the redis PUBSUB command. There are two ways I can think of around this

  1. Change the name of the pubsub method to something like pubsub_client
  2. Pass self to PubsubClient.new in the pubsub method and keep a reference to it in the Pubsubclient object. Forward the call to this Client object in a method called pubsub on the PubsubClient object.
mloughran commented 9 years ago

Good point; I don't think the command existed when I introduced this API. It's annoying, but I think the correct solution is to rename the pubsub method to pubsub_client as you suggest.

adityagodbole commented 9 years ago

That would be a breaking change though, and would have to be announced and versioned accordingly