We notice that occasionally the Firebase API returns an internal error of service unavailable and then our Android sender lambda appears to stop working until it is terminated due to timeout:
It appears that the lambda may be waiting for responses from Firebase API who may have become unavailable.
At the moment, we do not set any timeout configuration for requests we send to Firebase API. According to API doc, the HTTP client waits indefinitely for responses by default.
This PR adds configurable parameters (fcm.connectTimeout and fcm.requestTimeout) to set the timeout (in seconds) of making HTTP connections and waiting for responses.
We did a sanity test on CODE and we were able to receive notification via Android simulator.
What does this change?
We notice that occasionally the Firebase API returns an internal error of service unavailable and then our Android sender lambda appears to stop working until it is terminated due to timeout:
It appears that the lambda may be waiting for responses from Firebase API who may have become unavailable.
At the moment, we do not set any timeout configuration for requests we send to Firebase API. According to API doc, the HTTP client waits indefinitely for responses by default.
This PR adds configurable parameters (
fcm.connectTimeout
andfcm.requestTimeout
) to set the timeout (in seconds) of making HTTP connections and waiting for responses.We did a sanity test on
CODE
and we were able to receive notification via Android simulator.