User Tools

Site Tools


typo3-message-bus-rabbitmq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
typo3-message-bus-rabbitmq [2023/11/11 16:35] admintypo3-message-bus-rabbitmq [2023/11/12 01:34] (current) admin
Line 34: Line 34:
     factory: [ '@Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory', 'createTransport' ]     factory: [ '@Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory', 'createTransport' ]
     arguments:     arguments:
-      # You may want to store this in a environment variable+      # You may want to store this in a environment variable
 +      # Example: amqp://<username>:<password>@<host>:<port>/<vhost>/<exchange>
       $dsn: 'amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/messages'       $dsn: 'amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/messages'
-      $options: { }+      # For all available options see https://github.com/symfony/amqp-messenger/blob/6.3/Transport/Connection.php#L38-L65 
 +      $options: 
 +        auto_setup: true 
 +        # Queue options https://github.com/symfony/amqp-messenger/blob/6.3/Transport/Connection.php#L67-L72 
 +        queues: 
 +          MagicRabbit: 
 +            flags: 2 
 +        # Exchange options: https://github.com/symfony/amqp-messenger/blob/6.3/Transport/Connection.php#L74-L80 
 +        exchange: 
 +          type: fanout 
     tags:     tags:
       - name: 'messenger.sender'       - name: 'messenger.sender'
Line 49: Line 60:
 // Unset the default, so that it no longer applies // Unset the default, so that it no longer applies
 unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing']['*']); unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing']['*']);
-// Set Webhook-Messages and DynamicsMessage to asynchronous transport via doctrine+// Set Webhook-Messages and DynamicsMessage to asynchronous transport via RabbitMQ
 foreach ([WebhookMessageInterface::class, MyCustomMessage::class] as $className) { foreach ([WebhookMessageInterface::class, MyCustomMessage::class] as $className) {
     $GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing'][$className] = 'amqp'; // The tags identifier defines in Configuration/Services.yaml     $GLOBALS['TYPO3_CONF_VARS']['SYS']['messenger']['routing'][$className] = 'amqp'; // The tags identifier defines in Configuration/Services.yaml
 } }
 </code> </code>
 +
 +For more details see:
 +
 +  * https://usetypo3.com/messages-in-typo3.html
 +  * https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/MessageBus/Index.html
typo3-message-bus-rabbitmq.1699716917.txt.gz · Last modified: 2023/11/11 16:35 by admin