firebase / firebase/firebase-admin-java
Choosing Whether to Enable Retries in Firebase App Options
- Langage dominant
- Java
- Étoiles
- 620
- Forks
- 305
- Merge moyen
- 3 h 23 min
- PR mergées (30 j)
- 1
Description
Hello,
I have learned that FCM automatically retries when a 503 response is received.
However, our service already handles retries for undelivered messages through scheduling, so we do not want to use the default retry strategy.
```
public static HttpRequestFactory newAuthorizedRequestFactory(
FirebaseApp app, @Nullable RetryConfig retryConfig) {
HttpTransport transport = app.getOptions().getHttpTransport();
return transport.createRequestFactory(new FirebaseRequestInitializer(app, retryConfig));
}
```
To disable this behavior, I attempted to use a method provided in the ApiClientUtils class.
However, after debugging the initialization process, I found that it is not possible to set a custom RetryConfig value.
I assume there is a valid reason for restricting the redefinition of RetryConfig.
For example, it may be to prevent retries for responses other than 5xx errors or to avoid excessive retry requests within a short period.
What I would like is the ability to **enable or disable the retry feature as needed.**
I will proceed with creating a PR for this.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par retracer ApiClientUtils et la méthode newAuthorizedRequestFactory présentée dans le processus d’initialisation de FirebaseApp, en vous concentrant sur l’endroit où RetryConfig est défini ou restreint. Déterminez la manière prise en charge d’activer ou de désactiver les nouvelles tentatives sans modifier le comportement de nouvelle tentative sans rapport, et vérifiez que les deux modes configurés fonctionnent pour les requêtes FCM.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- firebase, java
- Domaine
- api, backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100