Skip to content

Commit 7acc337

Browse files
committed
Merge pull request #212 from podhy/master
Add connection_timeout and read_write_timeout option to configuration
2 parents c99c90f + 03be9d9 commit 7acc337

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ protected function addConnections(ArrayNodeDefinition $node)
5454
->scalarNode('password')->defaultValue('guest')->end()
5555
->scalarNode('vhost')->defaultValue('/')->end()
5656
->booleanNode('lazy')->defaultFalse()->end()
57+
->booleanNode('connection_timeout')->defaultValue(3)->end()
58+
->booleanNode('read_write_timeout')->defaultValue(3)->end()
5759
->booleanNode('keepalive')->defaultFalse()->info('requires php-amqplib v2.4.1+ and PHP5.4+')->end()
5860
->scalarNode('heartbeat')->defaultValue(0)->info('requires php-amqplib v2.4.1+')->end()
5961
->end()

DependencyInjection/OldSoundRabbitMqExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ protected function loadConnections()
8484
'AMQPLAIN', // login_method
8585
null, // login_response
8686
'en_US', // locale
87-
3, // connection_timeout
88-
3, // read_write_timeout
87+
$connection['connection_timeout'],
88+
$connection['read_write_timeout'],
8989
null, // context
9090
$connection['keepalive'],
9191
$connection['heartbeat'],

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ old_sound_rabbit_mq:
121121
password: 'guest'
122122
vhost: '/'
123123
lazy: false
124+
connection_timeout: 3
125+
read_write_timeout: 3
124126
125127
# requires php-amqplib v2.4.1+ and PHP5.4+
126128
keepalive: false

0 commit comments

Comments
 (0)