Clean code about redis pubsub