Reputation: 281
I have a publisher with 2 subscribers on GCP pub/sub, both the subscribers run a NodeJS code & acknowledge once the process is done.
Upvotes: 0
Views: 2407
Reputation: 446
The acknowledgement sent when a subscriber receives a message is separate from the acknowledgement sent to the publisher when Cloud Pub/Sub saves the message and makes it available to subscriptions. This is by design, Pub/Sub wants the senders of messages to be decoupled from the receivers of messages.
When publishing a message fails it is automatically retried unless the error doesn't warrant a retry. The Nodejs client library supports custom retry settings and the documentation gives an example to know which messages have been published.
Upvotes: 1