Skip to content

[Notifier] Add retryable strategy #42492

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

Closed

Conversation

ismail1432
Copy link
Contributor

@ismail1432 ismail1432 commented Aug 12, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes/no
Deprecations? no
License MIT
Doc PR symfony/symfony-docs#...

Add a max retries strategy for Notifications, this PR adds the possibility to retries N times a request.
I use the RetryableHttpClient added in #38182 / https://symfony.com/blog/new-in-symfony-5-2-retryable-http-client.

ATM I just deal with the max retries option, maybe we can add other options like delay and multiplier
Before adding test and complete option I would like your opinion 👍

framework:
    notifier:
        retry_failed:
            max_retries: 10
      # or retry_failed: true (with 3 by default)
        chatter_transports:
            slack: '%env(SLACK_DSN)%' 

@fabpot
Copy link
Member

fabpot commented Aug 12, 2021

There is already a retryable mechanism when using Messenger, I would not add another one. Being able to override the HTTP Client is enough to change the HTTP client the way you want if you need to.

@ismail1432 ismail1432 closed this Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants