Google Cloud Functions to only Ack Pub/Sub on success
I heard from Google support that they do not currently provide the means to delay the ACK when a cloud function is invoked by Pub/Sub. If you want to use cloud functions with Pub/Sub you need to handle the error case yourself. For example you could have your cloud function requeue a message for the retry with a retry count.
This would seem to make it unnecessarily difficult to guarantee execution with Pub/Sub and cloud functions.
This is a problem because Functions ACKing a message on invoke, even if they crash, prevents the use of the new "dead-letter" feature.
Also, it goes against the docs. see note after this code sample: https://cloud.google.com/functions/docs/calling/pubsub#sample_code