When subscribing to a topic, I handle the ack/nack myself and can easily call message.nack(millisecondsToNextRetry).
I would like to do the same thing in cloud functions using nodejs, i.e. under certain circumstances retry the function after a specified time.
Anyone know a good solution or workaround when triggering a cloud function from pub/sub?
So, the workaround I've been using is Cloud Tasks, scheduling an invocation of the function at a specified time with the Pubsub payload. So I will ack the function and schedule a "retry" with Cloud Tasks at a specific point in time.