The source code of publisher and consumer is added in this commit