firebase / firebase/firebase-admin-java
Choosing Whether to Enable Retries in Firebase App Options
- Ngôn ngữ chính
- Java
- Star
- 620
- Fork
- 305
- Merge trung bình
- 3 giờ 23 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách lần theo ApiClientUtils và phương thức newAuthorizedRequestFactory được nêu qua quá trình khởi tạo FirebaseApp, tập trung vào nơi RetryConfig được cố định hoặc hạn chế. Xác định cách được hỗ trợ để bật hoặc tắt việc thử lại mà không thay đổi hành vi thử lại không liên quan, đồng thời xác minh rằng cả hai chế độ đã cấu hình đều hoạt động đối với các yêu cầu FCM.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- firebase, java
- Lĩnh vực
- api, backend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100