Review main Merged

94837[FEATURE] Add Messenger failure transport support

Stefan Bürk CR +2 V +2 Expert +1693 −0 updated 11/04/26, 08:34

Commit message

A message whose handler fails while a worker consumes it can now be
retried on its transport and, once the retries are exhausted, parked
in a failure transport instead of being lost.

A "failed" transport is registered, reusing the TYPO3-managed
sys_messenger_messages table with queue_name "failed". It is a sender
only: workers never consume a failure transport, so
"messenger:consume" without a transport name still consumes the
"doctrine" transport.

Failure handling is opt-in and asynchronous only:

  $GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['failure_transport']

names the transport failed messages are parked in (default empty =
disabled). A "retry_strategy" (max_retries, delay, multiplier,
max_delay) and a "failure_transport" override per transport are
configured below

  $GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['transports']

The listeners of Symfony Messenger (AddErrorDetailsStampListener,
SendFailedMessageForRetryListener and
SendFailedMessageToFailureTransportListener) are event subscribers.
TYPO3 registers them as ordered PSR-14 listeners via small wrappers
using the #[AsEventListener] attribute, which delegate to the
Symfony listeners. TYPO3 provides the locators for retry strategies
and failure senders. The ResolveFailureTransportEvent
allows to adjust the failure transport of a transport at runtime.

The console commands messenger:failed:show, :remove and :retry
inspect, delete and handle the parked messages again. The retry
command keeps the stamps of a message, so handlers that succeeded
before are skipped, and parks a message that fails again with the
new error.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Daniel Goerz +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 26

Show 6 more files

Review log 2134

Show 59 earlier messages
  1. Stefan Bürk uploaded patch set 1 07/19/26, 22:33

  2. Stefan Bürk uploaded patch set 2 07/19/26, 22:38

  3. core-ci voted on patch set 1 V -1 07/19/26, 22:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104973

  4. core-ci voted on patch set 2 V -1 07/19/26, 22:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104974

  5. Stefan Bürk uploaded patch set 3 V -1 07/19/26, 22:48

  6. core-ci voted on patch set 3 V -1 07/19/26, 22:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104975

  7. Stefan Bürk uploaded patch set 4 V -1 07/19/26, 23:12

  8. core-ci voted on patch set 4 V -1 07/19/26, 23:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104976

  9. Stefan Bürk uploaded patch set 5 V -1 07/19/26, 23:27

  1. core-ci voted on patch set 5 V +1 07/19/26, 23:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104977

  2. Stefan Bürk rebased onto patch set 6 V +1 07/19/26, 23:39

  3. Stefan Bürk wrote 07/19/26, 23:39

    Topic set to messenger
  4. core-ci voted on patch set 6 V +1 07/19/26, 23:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104980

  5. Stefan Bürk uploaded patch set 7 V +1 07/20/26, 00:09

  6. core-ci voted on patch set 7 V +1 07/20/26, 00:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104982

  7. Stefan Bürk uploaded patch set 8 V +1 07/20/26, 00:25

  8. core-ci voted on patch set 8 V +1 07/20/26, 00:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104983

  9. Stefan Bürk commented on patch set 8 07/20/26, 01:04

    This change is ready for review.
  10. Stefan Bürk marked it work in progress 07/20/26, 01:04

  11. Stefan Bürk rebased onto patch set 9 V +1 07/20/26, 13:14

  12. core-ci voted on patch set 9 V +1 07/20/26, 13:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105033

  13. Stefan Bürk rebased onto patch set 10 V +1 07/28/26, 06:29

  14. core-ci voted on patch set 10 V +1 07/28/26, 06:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105520

  15. Stefan Bürk rebased onto patch set 11 V +1 08/01/26, 20:36

  16. core-ci voted on patch set 11 V -1 08/01/26, 20:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105819

  17. Benni Mack uploaded patch set 12 V -1 10/31/26, 20:09

  18. core-ci voted on patch set 12 V +1 10/31/26, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112975

  19. Benni Mack marked it ready for review 10/31/26, 20:28

  20. Benni Mack uploaded patch set 13 V +1 10/31/26, 23:18

  21. core-ci voted on patch set 13 V +1 11/01/26, 00:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112979

  22. Daniel Goerz voted on patch set 13 CR +1 11/02/26, 10:57

  23. Oliver Klee voted on patch set 13 V +1 11/02/26, 15:00

  24. Benni Mack voted on patch set 13 CR +2 V +2 11/04/26, 08:34

  25. Benni Mack merged patch set 14 11/04/26, 08:34