firebase / firebase/firebase-admin-java
Choosing Whether to Enable Retries in Firebase App Options
- 主要語言
- Java
- 星號
- 620
- 分支
- 305
- 平均合併
- 3 小時 23 分鐘
- 30 天內合併 PR
- 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.
貢獻指南
研究方向
首先,追蹤 ApiClientUtils 與所示的 newAuthorizedRequestFactory 方法在 FirebaseApp 初始化過程中的呼叫路徑,重點確定 RetryConfig 在哪裡被固定或限制。確定一種受支援的方式來啟用或停用重試,同時不改變無關的重試行為,並驗證兩種設定模式都適用於 FCM 請求。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- firebase, java
- 領域
- api, backend
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100