Closed bulletblp4 closed 4 years ago
SDK automatically does that so no additional handling is necessary. But if you really wish to access the headers, the v4 SDK provides the necessary APIs:
https://pkg.go.dev/firebase.google.com/go/v4/errorutils?tab=doc#HTTPResponse https://firebase.google.com/docs/reference/admin/error-handling#accessing-the-http-response
Thanks! I havent explored the code base, but as per the docmentations
the SDK will respect that when retrying as long as the specified wait duration is not very long
How long is long here. I am asking cause a while ago we encountered a case where gcm/fcm was down for an hour or more. And our queues were stacked up with thousands of messages. Will SDK handle that case aswell ?
SDK retires are intended to help recover from transient network and backend errors that are short-lived (in the order of seconds). Therefore the SDK does not retry if the backend server sends an error with Retry-After
set to a duration longer than 2 minutes.
As per the documentation, seems like we have to honor the retry after header. But the golang sdk doesn't seem to be exposing it.