Last active
October 16, 2017 15:16
-
-
Save ojhaujjwal/c05b5a39facb10a0b2fec354a4270e9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Bernard\Message\PlainMessage; | |
use Bernard\Producer; | |
use Bernard\QueueFactory\PersistentFactory; | |
use Bernard\Serializer; | |
use Symfony\Component\EventDispatcher\EventDispatcher; | |
//.. create $driver | |
$queueFactory = new PersistentFactory($driver, new Serializer()); | |
$eventDispatcher = new EventDispatcher(); | |
$producer = new Producer($queueFactory, $eventDispatcher); | |
$message = new PlainMessage('SendForgotPasswordEmail', array( | |
'user_id' => 12, | |
)); | |
$producer->produce($message, 'emails'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment