Skip to content

[Messenger] Document new log severity marker interface #15844

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
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
17 changes: 17 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,23 @@ 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.

Retry logging
~~~~~~~~~~~~~

.. versionadded:: 5.4

The ``LogRetryAsWarningInterface`` was introduced in Symfony 5.4.

When a message is sent for retry, a log message is logged indicating how many times the
message was retried along with the number of milliseconds of the delay. By default, retry
log messages have log severity `ERROR` except the final failed retry which is logged as
`CRITICAL`.

Exceptions implementing the
:class:`Symfony\\Component\\Messenger\\Exception\\LogRetryAsWarningInterface` are logged
in a similar fashion: each failed message handling attempt is logged as a warning and
the final failed attempt is logged as `CRITICAL`.

.. _messenger-failure-transport:

Saving & Retrying Failed Messages
Expand Down