- Issue created by @dpi
- 🇦🇺Australia dpi Perth, Australia
Since this mentions the retry/failed commands, it should be merged after https://git.drupalcode.org/project/sm/-/merge_requests/35
- 🇦🇺Australia dpi Perth, Australia
The docs also mention `sm messenger:failed:retry` command, which has not been implemented. In a MR or not.
Set to review to gather feedback on the MR in the meantime.
- 🇵🇱Poland sandboxpl Poland 🇵🇱
I am testing it with 1.x-dev version of the module + 2.0.0-alpha4 version of symfony_mailer module.
After setting up following YAML:parameters: sm.default_bus: sm.bus.default sm.buses: default: middleware: [ ] default_middleware: enabled: true event: middleware: [ ] default_middleware: enabled: true sm.routing: Symfony\Component\Mailer\Messenger\SendEmailMessage: asynchronous '*': synchronous sm.failure_transport: 'failed'
I can see that my failed messages are retried for 3 times and then they land in the failed queue. For testing I am just sending emails via SMTP transport with incorrect hostname.
I am also looking at usign different transport provided by sm_transport_doctrine module but this does not seem to work, and I can't find a way to configure it, is it correct that doctrine module won't support this functionality atm? - 🇦🇺Australia dpi Perth, Australia
@sandboxpl
I am also looking at usign different transport provided by sm_transport_doctrine module but this does not seem to work, and I can't find a way to configure it, is it correct that doctrine module won't support this functionality atm?
Transports shouldnt have to do anything to support failed functionality.
You just need to make sure the failed transport itself is pointing to the one you want.
SM has
sm.transports failed: dsn: 'drupal-sql://default?queue_name=failed'
So you just need to make sure your transports are re-defined it in your custom services.yml file, where the DSN is a
doctrine://
protocol, not the newdrupal-sql://
protocol.Please keep us updated with your progress, it helps a lot.
- 🇦🇺Australia dpi Perth, Australia
Should be something like
parameters: symfony_messenger_doctrine.transports: # Automatically create a Doctrine transport named 'doctrine'. # Override this to disable or add more. doctrine: dsn: 'doctrine://default?auto_setup=true' options: [] failed: dsn: 'doctrine://default?auto_setup=true&queue_name=failed' options: []
Or more verbose:
parameters: symfony_messenger_doctrine.transports: # Automatically create a Doctrine transport named 'doctrine'. # Override this to disable or add more. doctrine: dsn: 'doctrine://default?auto_setup=true' options: [] failure_transport: doctrine_failed doctrine_failed: dsn: 'doctrine://default?auto_setup=true&queue_name=failed' options: []