Skip to content

Commit 30abff6

Browse files
author
DC*
committed
Enable 'receive_wait_time' configuration parameter for IronMqProvider
The IronMqProvider was not using 'receive_wait_time' configuration for long polling but it's supported since IronMQ 1.5.2 (iron-io/iron_mq_php@5e61539). Update 'receive_wait_time' default value for bc as users unaware of this configuration and using IronMQ would now notice a 3 second delay when polling for messages. May be 'iron_mq_php' dependency should be updated to >=1.5.2
1 parent 9f70222 commit 30abff6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private function getQueuesNode()
171171
->example(1)
172172
->end()
173173
->scalarNode('receive_wait_time')
174-
->defaultValue(3)
174+
->defaultValue(0)
175175
->info('How many seconds to Long Poll when requesting messages - if supported')
176176
->example(3)
177177
->end()

src/Provider/IronMqProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ public function receive(array $options = [])
172172
$messages = $this->ironmq->getMessages(
173173
$this->getNameWithPrefix(),
174174
$options['messages_to_receive'],
175-
$options['message_timeout']
175+
$options['message_timeout'],
176+
$options['receive_wait_time']
176177
);
177178

178179
if (!is_array($messages)) {

0 commit comments

Comments
 (0)