Publish/Subscribe pattern

Added publish subscribe pattern to write_redis.c