Create pub sub and 持久化