Allow to specify timeout to publish_opt