Lin Du
Lin Du

Reputation: 102307

How to handle a message is acknowledged failed by SubscriberClient?

I found this docs: https://cloud.google.com/nodejs/docs/reference/pubsub/0.19.x/v1.SubscriberClient#acknowledge

If a message is acknowledged failed, will it be put back to the message queue and wait for redelivering later? Or this message is lost?

Upvotes: 1

Views: 363

Answers (1)

Kamal Aboul-Hosn
Kamal Aboul-Hosn

Reputation: 17216

Acknowledgements in Google Cloud Pub/Sub are best effort and the service as a whole has at-least-once delivery of messages. What this means is that if an acknowledgement fails (and even in rare cases, if you get back that an ack succeeded), the messages will be redelivered to a subscriber. A message is only deleted from Pub/Sub if the service successfully receives and processes an ack for the messages messageRetentionDuration passes, which defaults to seven days.

Upvotes: 1

Related Questions