firebase / firebase/firebase-admin-java

Choosing Whether to Enable Retries in Firebase App Options

Aperta
#1,075 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
needs-triage
Lingua principale
Java
Stelle
620
Fork
305
Merge medio
3h 23m
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing ApiClientUtils and the shown newAuthorizedRequestFactory method through FirebaseApp initialization, focusing on where RetryConfig is fixed or restricted. Determine the supported way to enable or disable retries without changing unrelated retry behavior, and verify that both configured modes work for FCM requests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
firebase, java
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.