Firebase-admin-node: FR: [Messaging] Add option to retry sending or expose Retry-After header

Created on 18 Jun 2017  路  9Comments  路  Source: firebase/firebase-admin-node

According to https://firebase.google.com/docs/cloud-messaging/admin/errors, clients should honor Retry-After header for messaging/server-unavailable and messaging/internal-error.

However, the MessagingDevicesResponse does not include a Retry-After header.

feature request

Most helpful comment

I suppose we need to expose that header in the response somehow. Will look into it.

All 9 comments

It is up to the server to decide whether to include that header in the response or not. If it is not present in the response, the client may retry immediately.

Thanks, @hiranya911 !

I don't know how I can check if the header exists. The formatted response does not mention it. https://firebase.google.com/docs/reference/admin/node/admin.messaging.MessagingDevicesResponse.

I suppose we need to expose that header in the response somehow. Will look into it.

Hello @hiranya911,
Is there any update on it?
I can't find anything in the docs or in the code.

Cheers

@sdomagala there hasn't been much direct progress on this. However, we recently re-implemented how the SDK makes HTTP calls (see #280 and all the PRs referenced therein). This makes it easier for us to support this requirement.

@hiranya911 Hello Firebase Team.

Is this thread related to my newly created issue here

Thanks!

We now have the ability to refer to response headers in the FCM module. Just need to figure out how to expose that information through the public API.

Just sent #518 for review, which implements the retry framework for the SDK.

As of #556 the SDK automatically retries on 503 errors (up to 4 retries), and it also honors the Retry-After header when available. Otherwise it would use regular exponential backoff.

Was this page helpful?
0 / 5 - 0 ratings