-
-
Notifications
You must be signed in to change notification settings - Fork 866
Conversation
@fabpot Will you merge this? If so, I am going to add some tests and docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a cool idea. So you could have one application using this spool adding messages on the queue and another application reading for the queue.
lib/classes/Swift/QueueSpool.php
Outdated
{ | ||
$this->context = $context; | ||
|
||
if (false == $queue instanceof PsrQueue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
===
use Interop\Queue\ExceptionInterface as PsrException; | ||
use Interop\Queue\PsrContext; | ||
use Interop\Queue\PsrQueue; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some class docs would be preferred.
lib/classes/Swift/QueueSpool.php
Outdated
*/ | ||
public function __construct(PsrContext $context, $queue = 'swiftmailer_spool') | ||
{ | ||
$this->context = $context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be moved to the bottom of the block. It will make the code a (tiny) bit easier to read.
@Nyholm done |
Added amqp interop optimized spool mailer |
PR adds an ability to use any queue-interop compatible MQ transport as an email spool.
Here's use case example, the source code is here:
The message was queued, to send message for real we have to flush queue.
TODO: