refactor code: fix message zookeeper node bugs