firebase / firebase/firebase-admin-java

Choosing Whether to Enable Retries in Firebase App Options

オープン
#1,075 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
needs-triage
主要言語
Java
スター
620
フォーク
305
平均マージ
3時間 23分
マージ済み PR(30日)
1

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、FirebaseApp の初期化を通じて ApiClientUtils と、示されている newAuthorizedRequestFactory メソッドを追跡し、RetryConfig がどこで固定または制限されているかに注目してください。ほかの無関係なリトライ動作を変更せずにリトライを有効化または無効化する、サポートされている方法を特定し、設定した両方のモードが FCM リクエストで機能することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
firebase, java
領域
api, backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。