Download the PHP package romainrg/rabbitmq_client without Composer
On this page you can find all versions of the php package romainrg/rabbitmq_client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download romainrg/rabbitmq_client
More information about romainrg/rabbitmq_client
Files in romainrg/rabbitmq_client
Package rabbitmq_client
Short Description CodeIgniter Library for RabbitMQ interactions with CodeIgniter using PHP-AMQPLib
License GPL-3.0-or-later
Homepage https://github.com/romainrg/rabbitmq_client.git
Informations about the package rabbitmq_client
rabbitmq_client (CodeIgniter)
CodeIgniter Library used to easilly interract with RabbitMQ 🐰❤
:books: Dependencies
- PHP 5.4+ (with Composer)
- Rabbit MQ Installed on your server (at least 3.5.*)
- php-amqplib
- CodeIgniter Framework (3.1.8+ recommanded)
:beginner: Installation
:arrow_right: Step 1 : Library installation by Composer
Just by running following command in the folder of your project :
Or by adding following lines to your composer.json
file :
Don't forget to include your autoload to CI config file :
:arrow_right: Step 2 : Run a composer update in the directory of your project with the following command :
:arrow_right: Step 3 : Create the following config file
You have to create it in the CI config folder located in ./application/config/rabbitmq.php
:arrow_right: Step 4 : Load the library in your CI Core Controller file
(Or just in a CI Controller)
:arrow_right: Step 5 : Enjoy and give me some improvements or ideas ! ;)
Examples
:arrow_right: Pushing some datas in a Queue:
This will create, if it does not exist, the 'hello_queue' queue and insert 'Hello World !' text inside it.
If you want to run your CI Controller Method with CLI command :
You will have the following return
:arrow_right: Fetching some datas from a Queue (only in CLI at this time):
This will fetch last inserted datas from the 'hello_queue' in real time, with parmanent mode activated and '_process' callback function.
The PHP Code :
Run it in CLI :
:arrow_right: Pushing some datas in a Queue with additional parameters:
This will create, if it does not exist, the 'hello_queue' queue and insert 'Hello World !' text inside it, the third parameter TRUE set the durability of the 'hello_queue' (TRUE = permanent, FALSE = not permanent), the last parameter 'delivery_mode (2)' makes message persistent (you can also add some parameters to this array).
For more CodeIgniter libraries, give me a :beer::grin:
:lock: License
All versions of rabbitmq_client with dependencies
codeigniter/framework Version ^3.1
php-amqplib/php-amqplib Version ^2.8.1
ext-sockets Version *