firebase / firebase/firebase-admin-java

Choosing Whether to Enable Retries in Firebase App Options

Abierto
#1,075 2 comentarios 0 reacciones 0 asignados Ver en GitHub
needs-triage
Lenguaje dominante
Java
Estrellas
620
Forks
305
Merge medio
3 h 23 min
PR fusionados (30 d)
1

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza rastreando ApiClientUtils y el método newAuthorizedRequestFactory mostrado a través de la inicialización de FirebaseApp, centrándote en dónde se fija o restringe RetryConfig. Determina la forma compatible de habilitar o deshabilitar los reintentos sin cambiar el comportamiento de reintentos no relacionado, y verifica que ambos modos configurados funcionan para las solicitudes de FCM.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
firebase, java
Área
api, backend
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.