Skip to content

Instantly share code, notes, and snippets.

@dgafka
Created September 24, 2022 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgafka/396f97752b5130d5642d1c7ed900d70a to your computer and use it in GitHub Desktop.
Save dgafka/396f97752b5130d5642d1c7ed900d70a to your computer and use it in GitHub Desktop.
Working with asynchronous errors in PHP
# config/packages/messenger.yaml
framework:
messenger:
transports:
failed: 'doctrine://default?queue_name=failed'
async:
retry_strategy:
max_retries: 3
# milliseconds delay
delay: 1000
# causes the delay to be higher before each retry
# e.g. 1 second delay, 2 seconds, 4 seconds
multiplier: 2
max_delay: 0
# override all of this with a service that
# implements Symfony\Component\Messenger\Retry\RetryStrategyInterface
# service: null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment