Closed
Description
I started using Google Cloud Functions to subscribe to a pub/sub topic. The problem is, that by default Pub/Sub messages are acknowledged on receive and not when the function executed successfully.
If I would use the gcloud CLI for the deployment of the function, I would add the --retry flag.
Is it somehow possible to do that now?
As it is not possible to include this in the serverless.yml yet, I would suggest something like this:
functions:
handlerNameFunction:
handler: handlerName
events:
- event:
eventType: providers/cloud.pubsub/eventTypes/topic.publish
resource: projects/:projectId/topics/:topic
retry: true
with a default to false
or if we want to be able to also add future flags:
functions:
handlerNameFunction:
handler: handlerName
events:
- event:
eventType: providers/cloud.pubsub/eventTypes/topic.publish
resource: projects/:projectId/topics/:topic
flags:
- retry
- Is there a way to sneak this flag in already?
- What do you think of the suggested addition?
Best,
Kalle