pccomponentes / messenger-retry-bundle
Symfony Bundle for retry policy in Symfony Messenger
Installs: 29 580
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.0
- pccomponentes/ddd: ^4.0
- symfony/framework-bundle: ^6.0
- symfony/messenger: ^6.0
Requires (Dev)
- dg/bypass-finals: ^1.4
- pccomponentes/coding-standard: ^2.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-11 05:59:10 UTC
README
This is a Bundle to add the ability to choose the retry policy based on the type of message you are trying to process.
Note: Messages should ultimately inherit from Message.
Installation
-
Install via composer
composer require pccomponentes/messenger-retry-bundle
-
Write the bundle configuration file (
config/packages/messenger_retry.yaml
) indicating the retry policies for each message class and the action you want to execute in each of them. An example of its content is:messenger_retry: - max_retries: 5 delay_milliseconds: 2000 multiplier: 2 max_delay_milliseconds: 2800000 msg_types: - PcComponentes\Ddd\Application\Command: auto # - PcComponentes\Ddd\Application\Command: always_retry # - PcComponentes\Ddd\Application\Command: never_retry
This file will be modified to add or remove any retry policies needed for the project it is used in.