From a79764811fefcdc2969436bf24e8f65f4c8c3ec1 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 7 Aug 2017 15:54:50 +0300 Subject: [PATCH] delay strategy --- pkg/amqp-bunny/AmqpContext.php | 2 +- pkg/amqp-ext/AmqpConnectionFactory.php | 2 +- pkg/amqp-tools/Tests/RabbitMqDlxDelayStrategyTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/amqp-bunny/AmqpContext.php b/pkg/amqp-bunny/AmqpContext.php index 3638434a4..84508e856 100644 --- a/pkg/amqp-bunny/AmqpContext.php +++ b/pkg/amqp-bunny/AmqpContext.php @@ -128,7 +128,7 @@ public function createConsumer(PsrDestination $destination) */ public function createProducer() { - $producer = new AmqpProducer($this->getBunnyChannel(), $this); + $producer = new AmqpProducer($this->getBunnyChannel(), $this); $producer->setDelayStrategy($this->delayStrategy); return $producer; diff --git a/pkg/amqp-ext/AmqpConnectionFactory.php b/pkg/amqp-ext/AmqpConnectionFactory.php index c9c8131d3..ebf4d40df 100644 --- a/pkg/amqp-ext/AmqpConnectionFactory.php +++ b/pkg/amqp-ext/AmqpConnectionFactory.php @@ -87,7 +87,7 @@ public function __construct($config = 'amqp://') public function createContext() { if ($this->config['lazy']) { - $context = new AmqpContext(function () { + $context = new AmqpContext(function () { return $this->createExtContext($this->establishConnection()); }, $this->config['receive_method']); $context->setDelayStrategy($this->delayStrategy); diff --git a/pkg/amqp-tools/Tests/RabbitMqDlxDelayStrategyTest.php b/pkg/amqp-tools/Tests/RabbitMqDlxDelayStrategyTest.php index 13e820ffb..9531fe4ce 100644 --- a/pkg/amqp-tools/Tests/RabbitMqDlxDelayStrategyTest.php +++ b/pkg/amqp-tools/Tests/RabbitMqDlxDelayStrategyTest.php @@ -5,8 +5,8 @@ use Enqueue\AmqpTools\DelayStrategy; use Enqueue\AmqpTools\RabbitMqDlxDelayStrategy; use Enqueue\Test\ClassExtensionTrait; -use Interop\Amqp\AmqpDestination; use Interop\Amqp\AmqpContext; +use Interop\Amqp\AmqpDestination; use Interop\Amqp\AmqpProducer; use Interop\Amqp\Impl\AmqpMessage; use Interop\Amqp\Impl\AmqpQueue;