1. Go to this page and download the library: Download elmys/yii2-queue-redis 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/ */
elmys / yii2-queue-redis example snippets
const QUEUE_ACCOUNT = 'queueAccount'; // Here will be real names of your queue on redis created
const QUEUE_BILLING = 'queueBilling';
const QUEUE_OTHER = 'queueOther';
const LAYER_DEV = '0';
const LAYER_STAGE = '1';
const LAYER_PROD = '9';
const LAYERS = [
LAYER_DEV => 'dev',
LAYER_STAGE => 'stage',
LAYER_PROD => 'prod',
];
const ONE_QUEUES = [
QUEUE_ACCOUNT,
QUEUE_BILLING,
];
const TWO_QUEUES = [
QUEUE_OTHER,
];
const ALL_QUEUES = [
'one-micro-service' => ONE_QUEUES, // these array keys for CSS-styling only
'two-micro-service' => TWO_QUEUES,
];