Java client add WaitForPubSub