firebase / firebase/firebase-admin-java

Choosing Whether to Enable Retries in Firebase App Options

Aberta
#1,075 2 comentários 0 reações 0 responsáveis Ver no GitHub
needs-triage
Linguagem predominante
Java
Estrelas
620
Forks
305
Merge médio
3h 23min
PRs com merge (30d)
1

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece rastreando ApiClientUtils e o método newAuthorizedRequestFactory mostrado durante a inicialização do FirebaseApp, concentrando-se em onde RetryConfig é fixado ou restringido. Determine a forma compatível de habilitar ou desabilitar as tentativas sem alterar o comportamento de tentativas não relacionado e verifique se ambos os modos configurados funcionam para solicitações FCM.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
firebase, java
Domínio
api, backend
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.