PHP code example of epii / tiny-mq-sdk

1. Go to this page and download the library: Download epii/tiny-mq-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

epii / tiny-mq-sdk example snippets



$client = new \epii\mq\client\driver\local_cli("php", "/Volumes/BOOTCAMP/php/phpworkspace/fayuan/crontab-scripts/root.php", __DIR__ . "/cache");
\epii\mq\client\MqClient::init($client) ;

\epii\mq\client\MqClient::add_push("ceshi", "php /Volumes/BOOTCAMP/php/phpworkspace/epii-composer-libs/epii-mq-sdk/test/test.php ".time().":".rand(1,10000), time());
$ret = \epii\mq\client\MqClient::add_submit() ;
var_dump($ret->isSuccess());
var_dump($ret->getMsg());






$client = new \epii\mq\client\driver\local_cli("php", "/Volumes/BOOTCAMP/php/phpworkspace/fayuan/crontab-scripts/root.php", __DIR__ . "/cache");
\epii\mq\client\MqClient::init($client);

$ret = \epii\mq\client\MqClient::finish("0000");
var_dump($ret->isSuccess());
var_dump($ret->getMsg());