Made pubsub error resilient