Skip to content

Commit

Permalink
upgrade to latest amqp version, enabling heartbeats (#18)
Browse files Browse the repository at this point in the history
* upgrade to latest amqp version, enabling heartbeats

* add sockets module
  • Loading branch information
TomK committed Oct 1, 2020
1 parent c2f5323 commit 30738d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
17 changes: 5 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,30 @@ jobs:
docker:
- image: php:7.1-alpine
environment:
ADD_MODULES: bcmath
ADD_MODULES: bcmath sockets
- image: rabbitmq:3.6-management
build-php72:
<<: *defaults
docker:
- image: php:7.2-alpine
environment:
ADD_MODULES: bcmath
ADD_MODULES: bcmath sockets
- image: rabbitmq:3.6-management
build-php73:
<<: *defaults
docker:
- image: php:7.3-alpine
environment:
ADD_MODULES: bcmath
ADD_MODULES: bcmath sockets
- image: rabbitmq:3.6-management
build-php74:
<<: *defaults
docker:
- image: php:7.4-alpine
environment:
ADD_MODULES: bcmath
- image: rabbitmq:3.6-management
build-phpRC:
<<: *defaults
docker:
- image: php:rc-alpine
environment:
ADD_MODULES: bcmath
ADD_MODULES: bcmath sockets
- image: rabbitmq:3.6-management

workflows:
version: 2
build:
Expand All @@ -65,4 +59,3 @@ workflows:
- build-php72
- build-php73
- build-php74
- build-phpRC
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"phpunit/phpunit": "~4.8.0",
"php-amqplib/php-amqplib": "~2.6.2",
"php-amqplib/php-amqplib": "~2.12.1",
"google/cloud-pubsub": "~1.3.0"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions src/Provider/Amqp/AmqpQueueProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function consumerCallback(AMQPMessage $msg)
$callback = $this->_consumerCallback;
$callback(
json_decode($msg->body),
$msg->delivery_info['delivery_tag']
$msg->getDeliveryTag()
);
}

Expand Down Expand Up @@ -281,7 +281,7 @@ public function consume(callable $callback)
}
try
{
$channel->wait(null, true, $this->_getWaitTime());
$channel->wait(null, false, $this->_getWaitTime());
}
catch(AMQPTimeoutException $e)
{
Expand Down

0 comments on commit 30738d3

Please sign in to comment.