Issue Bug Closed

#101699Default routing for messenger transports always applies.

Daniel Goerz 08/16/23, 14:40 updated 08/11/26, 08:46

Description

When using the symfony/messenger component in TYPO3, I discovered the following limitation:

The default configuration $GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing']['*'] = 'default' will apply even if a different routing target was configured for a message:

For example, if I set $GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing'][OrderSavedMessage::class] = 'doctrine'; then the message will be handled twice, because the '*' => 'default' config is still a match.

I have to unset the default with unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing']['*']);. Unsetting the default also has no effect on the default behavior, as default …. is the default anyway.

Reviews 5