Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choosing Whether to Enable Retries in Firebase App Options #1075

Open
ksiisk99 opened this issue Feb 12, 2025 · 1 comment
Open

Choosing Whether to Enable Retries in Firebase App Options #1075

ksiisk99 opened this issue Feb 12, 2025 · 1 comment

Comments

@ksiisk99
Copy link

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.

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants