Improve concurrency of PubSub handler