use req/rep to synchronize before pub/sub
Merge pull request #525 from eguven/improve_pubsub_example

use req/rep to synchronize before pub/sub