1. Go to this page and download the library: Download eislambey/rsmq 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/ */
eislambey / rsmq example snippets
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$rsmq = new \Islambey\RSMQ\RSMQ($redis);
$rsmq->createQueue('myqueue');
$queues = $rsmq->listQueues();
$rsmq->deleteQueue('myqueue');
$attributes = $rsmq->getQueueAttributes('myqueue');
echo "visibility timeout: ", $attributes['vt'], "\n";
echo "delay for new messages: ", $attributes['delay'], "\n";
echo "max size in bytes: ", $attributes['maxsize'], "\n";
echo "total received messages: ", $attributes['totalrecv'], "\n";
echo "total sent messages: ", $attributes['totalsent'], "\n";
echo "created: ", $attributes['created'], "\n";
echo "last modified: ", $attributes['modified'], "\n";
echo "current n of messages: ", $attributes['msgs'], "\n";
echo "hidden messages: ", $attributes['hiddenmsgs'], "\n";