Skip to content

[Messenger] Document getRetryDelay() #20429

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

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,13 @@ and must be retried. If you throw
:class:`Symfony\\Component\\Messenger\\Exception\\RecoverableMessageHandlingException`,
the message will always be retried infinitely and ``max_retries`` setting will be ignored.

If you want to override retry delay form the retry strategy. You can achieve this
using by providing it in the exception, using the ``getRetryDelay()`` method from :class:`Symfony\\Component\\Messenger\\Exception\\RecoverableExceptionInterface`.

.. versionadded:: 7.2

The method ``getRetryDelay()`` was introduced in Symfony 7.2.

.. _messenger-failure-transport:

Saving & Retrying Failed Messages
Expand Down