Review main Abandoned

90023[BUGFIX] Use wildcard route only as fallback for messages

Can Adrian Karadag CR +1 V -1 Easy +4 −1 updated 07/29/26, 14:40

Commit message

The TransportLocator incorrectly applied the
wildcard ('*') routing rule even when a more
specific route for a message class was found.
This led to messages being dispatched to both
the specific and the default transport.

This patch adjusts the logic to ensure the
wildcard route is only used as a fallback
when no specific message route matches.

Review

  • Code review CR +1
    • Daniel Goerz +1
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 1

Review log 2229

Show 34 earlier messages
  1. Can Adrian Karadag uploaded patch set 1 07/08/25, 12:37

  2. core-ci voted on patch set 1 V +1 07/08/25, 12:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81489

  3. Daniel Goerz commented on patch set 1 CR -1 07/09/25, 08:01

    The commit message should rather say what is fixed than what was broken

    TransportLocator.php:55

    Can't we just get rid of the '*' default config in CONF_VARS?
  4. Can Adrian Karadag commented on patch set 1 07/09/25, 08:12

    TransportLocator.php:55 Reply

    We cannot remove this default configuration as it is a dependency for the 'cms-webhooks' extension. The extension relies on this config for its message transport. Removing it would require changes of the 'cms-webhooks' extension.
  1. Can Adrian Karadag commented on patch set 1 07/09/25, 08:14

    Reply

    ahh thank you my bad, can I still adjust the commit message now?
  2. Daniel Goerz commented on patch set 1 07/09/25, 09:54

    Reply

    Yes, you can click on "Edit" just below the commit message
  3. Can Adrian Karadag updated the commit message in patch set 2 CR -1 V +1 07/09/25, 10:05

  4. Can Adrian Karadag commented on patch set 2 07/09/25, 10:08

    Reply

    thank you, I adjust the commit message hopefully now its better 😊
  5. core-ci voted on patch set 2 V +1 07/09/25, 10:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81521

  6. Can Adrian Karadag rebased onto patch set 3 V +1 10/02/25, 11:20

  7. core-ci voted on patch set 3 V +1 10/02/25, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85909

  8. Can Adrian Karadag commented on patch set 3 10/02/25, 13:16

    Reply

    Done
  9. Sascha Nowak commented on patch set 3 11/10/25, 19:30

    TransportLocator.php:54

    As said, I can think of use cases where it's useful to send it to multiple wildcard destinations. I think adjusting the documentation is the better way to solve this. If we like to go that direction I would suggest the following code: ```suggestion foreach (HandlersLocator::listTypes($envelope) as $type) { $transportForMessage = $sendersMap[$type] ?? []; # prevent sending the message to wildcard transport if other transports have already been added if ($type === '*' && count($seen) > 0) { continue; } if (is_string($transportForMessage)) { $transportForMessage = [$transportForMessage]; } foreach ($transportForMessage as $senderAlias) { if (!\in_array($senderAlias, $seen, true)) { $seen[] = $senderAlias; yield from $this->getSenderFromConfiguration($senderAlias); } } } ```
  10. Can Adrian Karadag uploaded patch set 4 V +1 11/14/25, 08:46

  11. core-ci voted on patch set 4 V -1 11/14/25, 08:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89666

  12. Can Adrian Karadag commented on patch set 4 11/14/25, 09:58

    TransportLocator.php:54 Reply

    i tested and applied your code suggestion, i hope now everything is fine 😊
  13. Stefan Bürk rebased onto patch set 5 V -1 11/24/25, 19:25

  14. core-ci voted on patch set 5 V -1 11/24/25, 19:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90893

  15. Can Adrian Karadag uploaded patch set 6 V -1 11/26/25, 11:33

  16. core-ci voted on patch set 6 V +1 11/26/25, 11:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91016

  17. Josua Vogel voted on patch set 6 CR +1 V +1 11/26/25, 11:57

  18. Simon Schaufelberger voted on patch set 6 CR +1 V +1 01/26/26, 08:38

  19. Guido Schmechel voted on patch set 6 CR +1 V +1 01/26/26, 10:17

  20. Benni Mack updated the commit message in patch set 7 CR +1 V +1 04/22/26, 06:26

  21. core-ci voted on patch set 7 V -1 04/22/26, 06:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100698

  22. Stefan Bürk commented on patch set 7 07/18/26, 00:18

    Unresolved

    Hey sorry, I saw that issue after working on a own solution (did not checked beforehand if already an issue exists or some change is pending) - but more as a `feature`: * 94829: [FEATURE] Add `messenger` wildcard routing fallback | https://review.typo3.org/c/Packages/TYPO3.CMS/+/94829 @can@karadag.co @daniel.goerz@b13.com @benni@typo3.org @guido@ayacoo.de @simonschaufi+typo3@gmail.com do you mind to have a look on my alternative implementation ?

    TransportLocator.php:55

    I think this approach is a little to naive. I stumpleled upon the very same issue recently in a project introducing heavily queue handling based on the messenger implementation - but we had more handling issues regarding the routing using multiple transports and priorisation having them defined on different kinds, for example based on a interface but one or two specific based on more specific class. Garvin also raised some concerned in the issue, which I would take as legit. However, I provided a additional approach (as feature) with b/c compat also describing how (my) approach can be used in older TYPO3 version either by providing it as a local path extension (sitepackage?) or composer patch. I pushed it here: * 94829: [FEATURE] Add `messenger` wildcard routing fallback | https://review.typo3.org/c/Packages/TYPO3.CMS/+/94829
  23. Can Adrian Karadag commented on patch set 7 07/20/26, 08:34

    TransportLocator.php:55 Reply Unresolved

    @stefan@buerk.tech at first glance, it looks good to me. We can drop my fix and use your approach instead. My change was only a small, quick fix to avoid dispatching the wildcard route every time, but as I can see, your solution addresses several additional improvements.
  24. Daniel Goerz voted on patch set 7 CR +1 07/29/26, 11:53

  25. Stefan Bürk abandoned the change 07/29/26, 14:40

    abandon if favour of 94829: [FEATURE] Add messenger wildcard routing fallback | https://review.typo3.org/c/Packages/TYPO3.CMS/+/94829 (approval/coordinated with can0199 on slack)