changed the publisher behavior to handle publish request before connecting to the redis server