Merge pull request #121 from astahovn/astahovn-patch-constant

Using self descriptional constant
This commit is contained in:
Michael Klishin 2017-03-20 23:57:49 +03:00 committed by GitHub
commit 7d09e3bd23

View File

@ -13,7 +13,7 @@ $channel->queue_declare('task_queue', false, true, false, false);
$data = implode(' ', array_slice($argv, 1));
if(empty($data)) $data = "Hello World!";
$msg = new AMQPMessage($data,
array('delivery_mode' => 2) # make message persistent
array('delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT)
);
$channel->basic_publish($msg, '', 'task_queue');