Skip to content

Commit 3fcc22f

Browse files
Merge pull request #279 from patrickallaert/deprecated-delivery_info
Replace deprecated php-amqplib API
2 parents e8ad99a + 1851d77 commit 3fcc22f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

php/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"php-amqplib/php-amqplib": ">=v2.8.2-rc3"
3+
"php-amqplib/php-amqplib": ">=v2.12.1"
44
}
55
}

php/rpc_server.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ function fib($n)
3535
'',
3636
$req->get('reply_to')
3737
);
38-
$req->delivery_info['channel']->basic_ack(
39-
$req->delivery_info['delivery_tag']
40-
);
38+
$req->ack();
4139
};
4240

4341
$channel->basic_qos(null, 1, null);

php/worker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
echo ' [x] Received ', $msg->body, "\n";
1515
sleep(substr_count($msg->body, '.'));
1616
echo " [x] Done\n";
17-
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
17+
$msg->ack();
1818
};
1919

2020
$channel->basic_qos(null, 1, null);

0 commit comments

Comments
 (0)