Skip to content

Commit 30738d3

Browse files
authored
upgrade to latest amqp version, enabling heartbeats (#18)
* upgrade to latest amqp version, enabling heartbeats * add sockets module
1 parent c2f5323 commit 30738d3

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

.circleci/config.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,30 @@ jobs:
2727
docker:
2828
- image: php:7.1-alpine
2929
environment:
30-
ADD_MODULES: bcmath
30+
ADD_MODULES: bcmath sockets
3131
- image: rabbitmq:3.6-management
3232
build-php72:
3333
<<: *defaults
3434
docker:
3535
- image: php:7.2-alpine
3636
environment:
37-
ADD_MODULES: bcmath
37+
ADD_MODULES: bcmath sockets
3838
- image: rabbitmq:3.6-management
3939
build-php73:
4040
<<: *defaults
4141
docker:
4242
- image: php:7.3-alpine
4343
environment:
44-
ADD_MODULES: bcmath
44+
ADD_MODULES: bcmath sockets
4545
- image: rabbitmq:3.6-management
4646
build-php74:
4747
<<: *defaults
4848
docker:
4949
- image: php:7.4-alpine
5050
environment:
51-
ADD_MODULES: bcmath
52-
- image: rabbitmq:3.6-management
53-
build-phpRC:
54-
<<: *defaults
55-
docker:
56-
- image: php:rc-alpine
57-
environment:
58-
ADD_MODULES: bcmath
51+
ADD_MODULES: bcmath sockets
5952
- image: rabbitmq:3.6-management
53+
6054
workflows:
6155
version: 2
6256
build:
@@ -65,4 +59,3 @@ workflows:
6559
- build-php72
6660
- build-php73
6761
- build-php74
68-
- build-phpRC

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": "~4.8.0",
24-
"php-amqplib/php-amqplib": "~2.6.2",
24+
"php-amqplib/php-amqplib": "~2.12.1",
2525
"google/cloud-pubsub": "~1.3.0"
2626
},
2727
"autoload": {

src/Provider/Amqp/AmqpQueueProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function consumerCallback(AMQPMessage $msg)
224224
$callback = $this->_consumerCallback;
225225
$callback(
226226
json_decode($msg->body),
227-
$msg->delivery_info['delivery_tag']
227+
$msg->getDeliveryTag()
228228
);
229229
}
230230

@@ -281,7 +281,7 @@ public function consume(callable $callback)
281281
}
282282
try
283283
{
284-
$channel->wait(null, true, $this->_getWaitTime());
284+
$channel->wait(null, false, $this->_getWaitTime());
285285
}
286286
catch(AMQPTimeoutException $e)
287287
{

0 commit comments

Comments
 (0)