Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 498 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 498 Bytes

RabbitMQ library for Opencart

Install php-amqplib

composer require php-amqplib/php-amqplib

Composer path

Composer_vendor/Opencart_dir/system/library

Add RabbitMQ config to opencart config.php

define('RABBITMQ_HOST', 'host');
define('RABBITMQ_PORT', '5672');
define('RABBITMQ_USER', 'login');
define('RABBITMQ_PASS', 'password');

Usage

Producer

$this->load->library('queue');
$this->queue->addTask('queueName', ['some' => 'data']);

Worker

cli/worker.php