Skip to content

Commit 80f8915

Browse files
authored
document getRetryDelay method
1 parent 577b39f commit 80f8915

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

messenger.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,17 @@ and must be retried. If you throw
11341134
:class:`Symfony\\Component\\Messenger\\Exception\\RecoverableMessageHandlingException`,
11351135
the message will always be retried infinitely and ``max_retries`` setting will be ignored.
11361136

1137+
Retry with a specific delay
1138+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1139+
1140+
Sometimes you may want to override retry delay form the retry strategy. You can achieve this
1141+
using by providing it in the exception, using the ``getRetryDelay()`` method from any
1142+
exception extending :class:`Symfony\\Component\\Messenger\\Exception\\RecoverableExceptionInterface`.
1143+
1144+
.. versionadded:: 7.2
1145+
1146+
The method ``getRetryDelay()`` was introduced in Symfony 7.2.
1147+
11371148
.. _messenger-failure-transport:
11381149

11391150
Saving & Retrying Failed Messages

0 commit comments

Comments
 (0)