From 7968b03cb57dd128c45fb90ec95ba771038ad852 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Wed, 11 Oct 2017 19:58:39 +0300 Subject: [PATCH 1/3] [amqp(s)] Use same qos options across all amqp transports. --- pkg/amqp-bunny/AmqpConnectionFactory.php | 24 +++++++- .../Tests/Spec/AmqpPreFetchCountTest.php | 22 +++++++ ...ayedMessageWithDelayPluginStrategyTest.php | 11 +++- ...ceiveDelayedMessageWithDlxStrategyTest.php | 2 +- ...pSendAndReceiveTimestampAsIntengerTest.php | 22 +++++++ pkg/amqp-ext/AmqpConnectionFactory.php | 45 +++++++++----- .../Tests/AmqpConnectionFactoryConfigTest.php | 59 +++++++++++-------- ...ouldRemoveConsumerTagOnUnsubscribeTest.php | 2 +- .../AmqpBasicConsumeUntilUnsubscribedTest.php | 2 +- .../Tests/Spec/AmqpPreFetchCountTest.php | 22 +++++++ ...ayedMessageWithDelayPluginStrategyTest.php | 2 +- ...ceiveDelayedMessageWithDlxStrategyTest.php | 2 +- ...pSendAndReceiveTimestampAsIntengerTest.php | 22 +++++++ pkg/amqp-ext/composer.json | 2 +- pkg/amqp-lib/AmqpConnectionFactory.php | 20 ++++++- pkg/amqp-lib/Tests/Spec/AmqpProducerTest.php | 22 +++++++ ...pSendAndReceiveTimestampAsIntengerTest.php | 22 +++++++ 17 files changed, 251 insertions(+), 52 deletions(-) create mode 100644 pkg/amqp-bunny/Tests/Spec/AmqpPreFetchCountTest.php create mode 100644 pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php create mode 100644 pkg/amqp-ext/Tests/Spec/AmqpPreFetchCountTest.php create mode 100644 pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php create mode 100644 pkg/amqp-lib/Tests/Spec/AmqpProducerTest.php create mode 100644 pkg/amqp-lib/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php diff --git a/pkg/amqp-bunny/AmqpConnectionFactory.php b/pkg/amqp-bunny/AmqpConnectionFactory.php index 8bf7c6028..ab1fb09bf 100644 --- a/pkg/amqp-bunny/AmqpConnectionFactory.php +++ b/pkg/amqp-bunny/AmqpConnectionFactory.php @@ -58,7 +58,23 @@ public function __construct($config = 'amqp:') throw new \LogicException('The config must be either an array of options, a DSN string or null'); } - $this->config = array_replace($this->defaultConfig(), $config); + $config = array_replace($this->defaultConfig(), $config); + + $config = array_replace($this->defaultConfig(), $config); + if (array_key_exists('qos_global', $config)) { + $config['qos_global'] = (bool) $config['qos_global']; + } + if (array_key_exists('qos_prefetch_count', $config)) { + $config['qos_prefetch_count'] = (int) $config['qos_prefetch_count']; + } + if (array_key_exists('qos_prefetch_size', $config)) { + $config['qos_prefetch_size'] = (int) $config['qos_prefetch_size']; + } + if (array_key_exists('lazy', $config)) { + $config['lazy'] = (bool) $config['lazy']; + } + + $this->config = $config; $supportedMethods = ['basic_get', 'basic_consume']; if (false == in_array($this->config['receive_method'], $supportedMethods, true)) { @@ -77,7 +93,10 @@ public function createContext() { if ($this->config['lazy']) { $context = new AmqpContext(function () { - return $this->establishConnection()->channel(); + $channel = $this->establishConnection()->channel(); + $channel->qos($this->config['qos_prefetch_size'], $this->config['qos_prefetch_count'], $this->config['qos_global']); + + return $channel; }, $this->config); $context->setDelayStrategy($this->delayStrategy); @@ -86,6 +105,7 @@ public function createContext() $context = new AmqpContext($this->establishConnection()->channel(), $this->config); $context->setDelayStrategy($this->delayStrategy); + $context->setQos($this->config['qos_prefetch_size'], $this->config['qos_prefetch_count'], $this->config['qos_global']); return $context; } diff --git a/pkg/amqp-bunny/Tests/Spec/AmqpPreFetchCountTest.php b/pkg/amqp-bunny/Tests/Spec/AmqpPreFetchCountTest.php new file mode 100644 index 000000000..53ae33e14 --- /dev/null +++ b/pkg/amqp-bunny/Tests/Spec/AmqpPreFetchCountTest.php @@ -0,0 +1,22 @@ +createContext(); + } +} diff --git a/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php b/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php index c5d7ed40b..034eea13b 100644 --- a/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php +++ b/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php @@ -2,8 +2,9 @@ namespace Enqueue\AmqpBunny\Tests\Spec; -use Enqueue\AmqpLib\AmqpConnectionFactory; +use Enqueue\AmqpBunny\AmqpConnectionFactory; use Enqueue\AmqpTools\RabbitMqDelayPluginDelayStrategy; +use Interop\Amqp\AmqpContext; use Interop\Queue\PsrContext; use Interop\Queue\Spec\SendAndReceiveDelayedMessageFromQueueSpec; @@ -12,6 +13,11 @@ */ class AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest extends SendAndReceiveDelayedMessageFromQueueSpec { + public function test() + { + $this->markTestIncomplete(); + } + /** * {@inheritdoc} */ @@ -25,12 +31,15 @@ protected function createContext() /** * {@inheritdoc} + * + * @param AmqpContext $context */ protected function createQueue(PsrContext $context, $queueName) { $queue = parent::createQueue($context, $queueName); $context->declareQueue($queue); + $context->purgeQueue($queue); return $queue; } diff --git a/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php b/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php index 7795d01b8..629eb3ec0 100644 --- a/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php +++ b/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php @@ -2,7 +2,7 @@ namespace Enqueue\AmqpBunny\Tests\Spec; -use Enqueue\AmqpLib\AmqpConnectionFactory; +use Enqueue\AmqpBunny\AmqpConnectionFactory; use Enqueue\AmqpTools\RabbitMqDlxDelayStrategy; use Interop\Queue\PsrContext; use Interop\Queue\Spec\SendAndReceiveDelayedMessageFromQueueSpec; diff --git a/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php b/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php new file mode 100644 index 000000000..2bf30f816 --- /dev/null +++ b/pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php @@ -0,0 +1,22 @@ +createContext(); + } +} diff --git a/pkg/amqp-ext/AmqpConnectionFactory.php b/pkg/amqp-ext/AmqpConnectionFactory.php index 824856df5..85adb0d05 100644 --- a/pkg/amqp-ext/AmqpConnectionFactory.php +++ b/pkg/amqp-ext/AmqpConnectionFactory.php @@ -34,8 +34,9 @@ class AmqpConnectionFactory implements InteropAmqpConnectionFactory, DelayStrate * 'connect_timeout' => 'Connection timeout. Note: 0 or greater seconds. May be fractional.', * 'persisted' => 'bool, Whether it use single persisted connection or open a new one for every context', * 'lazy' => 'the connection will be performed as later as possible, if the option set to true', - * 'pre_fetch_count' => 'Controls how many messages could be prefetched', - * 'pre_fetch_size' => 'Controls how many messages could be prefetched', + * 'qos_prefetch_size' => 'The server will send a message in advance if it is equal to or smaller in size than the available prefetch size. May be set to zero, meaning "no specific limit"', + * 'qos_prefetch_count' => 'Specifies a prefetch window in terms of whole messages.', + * 'qos_global' => 'If "false" the QoS settings apply to the current channel only. If this field is "true", they are applied to the entire connection.', * 'receive_method' => 'Could be either basic_get or basic_consume', * ] * @@ -72,7 +73,7 @@ public function __construct($config = 'amqp:') } if ('basic_consume' == $this->config['receive_method']) { - if (false == (version_compare(phpversion('amqp'), '1.9.1', '>=') || phpversion('amqp') == '1.9.1-dev')) { + if (false == (version_compare(phpversion('amqp'), '1.9.1', '>=') || '1.9.1-dev' == phpversion('amqp'))) { // @see https://github.com/php-enqueue/enqueue-dev/issues/110 and https://github.com/pdezwart/php-amqp/issues/281 throw new \LogicException('The "basic_consume" method does not work on amqp extension prior 1.9.1 version.'); } @@ -88,7 +89,10 @@ public function createContext() { if ($this->config['lazy']) { $context = new AmqpContext(function () { - return $this->createExtContext($this->establishConnection()); + $extContext = $this->createExtContext($this->establishConnection()); + $extContext->qos($this->config['qos_prefetch_size'], $this->config['qos_prefetch_count']); + + return $extContext; }, $this->config['receive_method']); $context->setDelayStrategy($this->delayStrategy); @@ -97,6 +101,7 @@ public function createContext() $context = new AmqpContext($this->createExtContext($this->establishConnection()), $this->config['receive_method']); $context->setDelayStrategy($this->delayStrategy); + $context->setQos($this->config['qos_prefetch_size'], $this->config['qos_prefetch_count'], $this->config['qos_global']); return $context; } @@ -108,16 +113,7 @@ public function createContext() */ private function createExtContext(\AMQPConnection $extConnection) { - $channel = new \AMQPChannel($extConnection); - if (false == empty($this->config['pre_fetch_count'])) { - $channel->setPrefetchCount((int) $this->config['pre_fetch_count']); - } - - if (false == empty($this->config['pre_fetch_size'])) { - $channel->setPrefetchSize((int) $this->config['pre_fetch_size']); - } - - return $channel; + return new \AMQPChannel($extConnection); } /** @@ -183,6 +179,22 @@ private function parseDsn($dsn) return urldecode($value); }, $config); + if (array_key_exists('qos_global', $config)) { + $config['qos_global'] = (bool) $config['qos_global']; + } + if (array_key_exists('qos_prefetch_count', $config)) { + $config['qos_prefetch_count'] = (int) $config['qos_prefetch_count']; + } + if (array_key_exists('qos_prefetch_size', $config)) { + $config['qos_prefetch_size'] = (int) $config['qos_prefetch_size']; + } + if (array_key_exists('lazy', $config)) { + $config['lazy'] = (bool) $config['lazy']; + } + if (array_key_exists('persisted', $config)) { + $config['persisted'] = (bool) $config['persisted']; + } + return $config; } @@ -202,8 +214,9 @@ private function defaultConfig() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ]; } diff --git a/pkg/amqp-ext/Tests/AmqpConnectionFactoryConfigTest.php b/pkg/amqp-ext/Tests/AmqpConnectionFactoryConfigTest.php index 2cbbc2022..9629ce455 100644 --- a/pkg/amqp-ext/Tests/AmqpConnectionFactoryConfigTest.php +++ b/pkg/amqp-ext/Tests/AmqpConnectionFactoryConfigTest.php @@ -73,8 +73,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -94,8 +95,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -113,8 +115,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -132,8 +135,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -151,8 +155,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -170,8 +175,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -189,8 +195,9 @@ public static function provideConfigs() 'connect_timeout' => '2', 'persisted' => false, 'lazy' => '', - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -208,8 +215,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; @@ -227,14 +235,15 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => false, - 'pre_fetch_count' => null, - 'pre_fetch_size' => null, + 'qos_prefetch_size' => 0, + 'qos_prefetch_count' => 1, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; yield [ - ['pre_fetch_count' => 123, 'pre_fetch_size' => 321], + ['qos_prefetch_count' => 123, 'qos_prefetch_size' => 321], [ 'host' => 'localhost', 'port' => 5672, @@ -246,14 +255,15 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => 123, - 'pre_fetch_size' => 321, + 'qos_prefetch_count' => 123, + 'qos_prefetch_size' => 321, + 'qos_global' => false, 'receive_method' => 'basic_get', ], ]; yield [ - 'amqp://user:pass@host:10000/vhost?pre_fetch_count=123&pre_fetch_size=321', + 'amqp://user:pass@host:10000/vhost?qos_prefetch_count=123&qos_prefetch_size=321&qos_global=1', [ 'host' => 'host', 'port' => '10000', @@ -265,8 +275,9 @@ public static function provideConfigs() 'connect_timeout' => null, 'persisted' => false, 'lazy' => true, - 'pre_fetch_count' => 123, - 'pre_fetch_size' => 321, + 'qos_prefetch_size' => 321, + 'qos_prefetch_count' => 123, + 'qos_global' => true, 'receive_method' => 'basic_get', ], ]; diff --git a/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeShouldRemoveConsumerTagOnUnsubscribeTest.php b/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeShouldRemoveConsumerTagOnUnsubscribeTest.php index e56ffcbe4..c5e139f37 100644 --- a/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeShouldRemoveConsumerTagOnUnsubscribeTest.php +++ b/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeShouldRemoveConsumerTagOnUnsubscribeTest.php @@ -12,7 +12,7 @@ class AmqpBasicConsumeShouldRemoveConsumerTagOnUnsubscribeTest extends BasicCons { public function test() { - $this->markTestSkipped('Seg fault.'); + $this->markTestIncomplete('Seg fault.'); } /** diff --git a/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeUntilUnsubscribedTest.php b/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeUntilUnsubscribedTest.php index 867b69c0f..3d9dcc449 100644 --- a/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeUntilUnsubscribedTest.php +++ b/pkg/amqp-ext/Tests/Spec/AmqpBasicConsumeUntilUnsubscribedTest.php @@ -12,7 +12,7 @@ class AmqpBasicConsumeUntilUnsubscribedTest extends BasicConsumeUntilUnsubscribe { public function test() { - $this->markTestSkipped('Sig fault'); + $this->markTestIncomplete('Seg fault'); } /** diff --git a/pkg/amqp-ext/Tests/Spec/AmqpPreFetchCountTest.php b/pkg/amqp-ext/Tests/Spec/AmqpPreFetchCountTest.php new file mode 100644 index 000000000..265c50e04 --- /dev/null +++ b/pkg/amqp-ext/Tests/Spec/AmqpPreFetchCountTest.php @@ -0,0 +1,22 @@ +createContext(); + } +} diff --git a/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php b/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php index bb1b0c183..bb71e911c 100644 --- a/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php +++ b/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php @@ -2,7 +2,7 @@ namespace Enqueue\AmqpExt\Tests\Spec; -use Enqueue\AmqpLib\AmqpConnectionFactory; +use Enqueue\AmqpExt\AmqpConnectionFactory; use Enqueue\AmqpTools\RabbitMqDelayPluginDelayStrategy; use Interop\Queue\PsrContext; use Interop\Queue\Spec\SendAndReceiveDelayedMessageFromQueueSpec; diff --git a/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php b/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php index 74d6233f1..4ae6a1bae 100644 --- a/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php +++ b/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php @@ -2,7 +2,7 @@ namespace Enqueue\AmqpExt\Tests\Spec; -use Enqueue\AmqpLib\AmqpConnectionFactory; +use Enqueue\AmqpExt\AmqpConnectionFactory; use Enqueue\AmqpTools\RabbitMqDlxDelayStrategy; use Interop\Queue\PsrContext; use Interop\Queue\Spec\SendAndReceiveDelayedMessageFromQueueSpec; diff --git a/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php b/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php new file mode 100644 index 000000000..00d7e3840 --- /dev/null +++ b/pkg/amqp-ext/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php @@ -0,0 +1,22 @@ +createContext(); + } +} diff --git a/pkg/amqp-ext/composer.json b/pkg/amqp-ext/composer.json index f39bc475c..a54275377 100644 --- a/pkg/amqp-ext/composer.json +++ b/pkg/amqp-ext/composer.json @@ -6,7 +6,7 @@ "license": "MIT", "require": { "php": ">=5.6", - "ext-amqp": "^1.6", + "ext-amqp": "^1.9.1", "queue-interop/amqp-interop": "^0.7@dev", "enqueue/amqp-tools": "^0.8@dev" diff --git a/pkg/amqp-lib/AmqpConnectionFactory.php b/pkg/amqp-lib/AmqpConnectionFactory.php index 3c90dd473..90385e8a9 100644 --- a/pkg/amqp-lib/AmqpConnectionFactory.php +++ b/pkg/amqp-lib/AmqpConnectionFactory.php @@ -63,7 +63,21 @@ public function __construct($config = 'amqp:') throw new \LogicException('The config must be either an array of options, a DSN string or null'); } - $this->config = array_replace($this->defaultConfig(), $config); + $config = array_replace($this->defaultConfig(), $config); + if (array_key_exists('qos_global', $config)) { + $config['qos_global'] = (bool) $config['qos_global']; + } + if (array_key_exists('qos_prefetch_count', $config)) { + $config['qos_prefetch_count'] = (int) $config['qos_prefetch_count']; + } + if (array_key_exists('qos_prefetch_size', $config)) { + $config['qos_prefetch_size'] = (int) $config['qos_prefetch_size']; + } + if (array_key_exists('lazy', $config)) { + $config['lazy'] = (bool) $config['lazy']; + } + + $this->config = $config; $supportedMethods = ['basic_get', 'basic_consume']; if (false == in_array($this->config['receive_method'], $supportedMethods, true)) { @@ -207,11 +221,11 @@ private function parseDsn($dsn) unset($dsnConfig['scheme'], $dsnConfig['query'], $dsnConfig['fragment'], $dsnConfig['path']); - $dsnConfig = array_map(function ($value) { + $config = array_map(function ($value) { return urldecode($value); }, $dsnConfig); - return $dsnConfig; + return $config; } /** diff --git a/pkg/amqp-lib/Tests/Spec/AmqpProducerTest.php b/pkg/amqp-lib/Tests/Spec/AmqpProducerTest.php new file mode 100644 index 000000000..9285d598f --- /dev/null +++ b/pkg/amqp-lib/Tests/Spec/AmqpProducerTest.php @@ -0,0 +1,22 @@ +createContext()->createProducer(); + } +} diff --git a/pkg/amqp-lib/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php b/pkg/amqp-lib/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php new file mode 100644 index 000000000..2574f5ab2 --- /dev/null +++ b/pkg/amqp-lib/Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php @@ -0,0 +1,22 @@ +createContext(); + } +} From d9fa2561bb9f2751627641d078be9079b90b5966 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Wed, 11 Oct 2017 20:02:36 +0300 Subject: [PATCH 2/3] req queue spec 0.5.2 --- pkg/amqp-bunny/composer.json | 2 +- pkg/amqp-ext/composer.json | 2 +- pkg/amqp-lib/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/amqp-bunny/composer.json b/pkg/amqp-bunny/composer.json index 0e586f68e..ca5eea964 100644 --- a/pkg/amqp-bunny/composer.json +++ b/pkg/amqp-bunny/composer.json @@ -16,7 +16,7 @@ "enqueue/test": "^0.8@dev", "enqueue/enqueue": "^0.8@dev", "enqueue/null": "^0.8@dev", - "queue-interop/queue-spec": "^0.5.1@dev", + "queue-interop/queue-spec": "^0.5.2@dev", "symfony/dependency-injection": "^2.8|^3", "symfony/config": "^2.8|^3" }, diff --git a/pkg/amqp-ext/composer.json b/pkg/amqp-ext/composer.json index a54275377..4821ddd1e 100644 --- a/pkg/amqp-ext/composer.json +++ b/pkg/amqp-ext/composer.json @@ -16,7 +16,7 @@ "enqueue/test": "^0.8@dev", "enqueue/enqueue": "^0.8@dev", "enqueue/null": "^0.8@dev", - "queue-interop/queue-spec": "^0.5.1@dev", + "queue-interop/queue-spec": "^0.5.2@dev", "empi89/php-amqp-stubs": "*@dev", "symfony/dependency-injection": "^2.8|^3", "symfony/config": "^2.8|^3" diff --git a/pkg/amqp-lib/composer.json b/pkg/amqp-lib/composer.json index bde67ffd9..4c4702e06 100644 --- a/pkg/amqp-lib/composer.json +++ b/pkg/amqp-lib/composer.json @@ -16,7 +16,7 @@ "enqueue/test": "^0.8@dev", "enqueue/enqueue": "^0.8@dev", "enqueue/null": "^0.8@dev", - "queue-interop/queue-spec": "^0.5.1@dev", + "queue-interop/queue-spec": "^0.5.2@dev", "symfony/dependency-injection": "^2.8|^3", "symfony/config": "^2.8|^3" }, From e69c1e64ce77acbf50525df9c18c9cd8f33f8026 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Wed, 11 Oct 2017 20:42:38 +0300 Subject: [PATCH 3/3] [doc] add --skip option to the doc --- docs/bundle/cli_commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/bundle/cli_commands.md b/docs/bundle/cli_commands.md index bf1166459..02225a105 100644 --- a/docs/bundle/cli_commands.md +++ b/docs/bundle/cli_commands.md @@ -29,6 +29,7 @@ Options: --setup-broker Creates queues, topics, exchanges, binding etc on broker side. --idle-timeout=IDLE-TIMEOUT The time in milliseconds queue consumer idle if no message has been received. --receive-timeout=RECEIVE-TIMEOUT The time in milliseconds queue consumer waits for a message. + --skip[=SKIP] Queues to skip consumption of messages from (multiple values allowed) -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version