splashx / notification-mq-bundle
Add queue's to notification bundle
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Forks: 0
Type:symfony-bundle
pkg:composer/splashx/notification-mq-bundle
Requires
- php: >=7.0
- amphp/thread: 0.8.1
- php-amqplib/php-amqplib: ^2.7
- psr/log: ^1.0.1
- symfony-bro/notification-core: ^0.2|^0.3|^0.4
- symfony-bro/notification-core-bundle: ^0.3.1
- symfony/config: ^3.2|^4
- symfony/dependency-injection: ^3.2
Requires (Dev)
- phpunit/phpunit: ^7.3
- symfony/phpunit-bridge: ^4.1
This package is not auto-updated.
Last update: 2025-10-18 02:46:56 UTC
README
This extension provides the ability to send messages deferred
Usage
- Install extention.
- Configure AMQPStreamConnection connection:
PhpAmqpLib\Connection\AMQPStreamConnection: autowire: true arguments: - '%rabbit_host%' - '%rabbit_port%' - '%rabbit_login%' - '%rabbit_pass%' - Configure MQClient:
Splashx\NotificationQueueBundle\Driver\MQClient: arguments: - '%rabbit_queue%' - '%rabbit_consumer%' - '@PhpAmqpLib\Connection\AMQPStreamConnection' - Configure NotificationManager Decoration with:
Splashx\NotificationQueueBundle\Model\NotificationManagerDecorator: decorates: 'symfony_bro.notification_core.notification_manager' arguments: ['@Splashx\NotificationQueueBundle\Model\NotificationManagerDecorator.inner'] - In yours NotificationBuilder use MQNotificationDecorator notification type with argument notification object you need to send deffered.
return new MQNotificationDecorator(new TelegramNotification([ 'chat_id' => '276316291', 'fullName' => $context->getUserChangedPost()->getFullName(), 'postTitle' => $context->getPost()->getTitle(), 'template' => $template->getTemplate(), ])); - Configure comand with:
splashx_notification_queue.command.mqread_queue_command: class: Splashx\NotificationQueueBundle\Command\MQReadQueueCommand arguments: ['@symfony_bro.notification_core.notification_manager', '@Splashx\NotificationQueueBundle\Driver\MQClient'] tags: - { name: console.command } - Listen notification queue with MQnotifications:readQueue
- Be happy!