-
Notifications
You must be signed in to change notification settings - Fork 510
Message queue
Messaging (e-mails, mostly) in Chamilo 2 is a bit different from Chamilo 1, because of using Symfony.
The general logic is that we use the Messenger transport component, which is highly configurable.
By default, we use a simple synchronous messaging mechanism, which works similarly to Chamilo 1: we send e-mails through the MailHelper class (Send() method) directly. So if you send 10k e-mails through a slow SMTP connection, it will take a considerable amount of time.
However, and this is where we enjoy Symfony's large palette of options, you can use new messenger transports by defining MESSENGER_TRANSPORT_DSN
in .env
, loading the required dependency, and updating messenger.yaml by enabling the @prod
section towards the end.
Once enabled (and the cache has been cleared), any message sent through Chamilo will pass through the configured messenger.
Doctrine Messenger is a DB table-based message queue.
To enable:
- add "doctrine/doctrine-messenger" to composer.json
- composer install
- edit config/messenger.yaml
- uncomment the 2-parts @prod block at the end
- edit .env
- set MESSENGER_TRANSPORT_DSN=doctrine://messenger
- php bin/console cache:clear
To enable:
- add "doctrine/doctrine-messenger" to composer.json
- composer install
- edit config/messenger.yaml
- uncomment the 2-parts @prod block at the end
- edit .env
- set MESSENGER_TRANSPORT_DSN=ses+smtp://ACCESS_KEY:SECRET_KEY@default?region=REGION
- php bin/console cache:clear
-
Home
- Tools and sessions
- Quiz: Importing
- Releases
- Community support strategy
- Translation management
- How to report issues
- Development
- Integration