-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[amqp] Delay Strategy #152
Conversation
@@ -0,0 +1,43 @@ | |||
<?php | |||
|
|||
namespace Enqueue\Client\Amqp; |
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.
could you create a separate pkg, call it amqp-tools
use Interop\Amqp\AmqpTopic; | ||
use Interop\Amqp\Impl\AmqpBind; | ||
|
||
class DelayPluginDelayStrategy implements DelayStrategy |
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.
RabbitMQDelayPluginDelayStrategy
use Interop\Amqp\AmqpQueue; | ||
use Interop\Amqp\AmqpTopic; | ||
|
||
class DlxDelayStrategy implements DelayStrategy |
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.
RabbitMQDlxDelayStrategy
$delayQueue->setArgument('x-dead-letter-exchange', ''); | ||
$delayQueue->setArgument('x-dead-letter-routing-key', $dest->getQueueName()); | ||
} else { | ||
throw new \LogicException(); |
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.
InvalidDestinationException
Dont forget about DelayStragegyAware interface. |
f174e80
to
4f65c87
Compare
No description provided.