Skip to content

verwilst/rabbitmq-laravel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RabbitMQLaravel

Latest Stable Version Latest Unstable Version License

Install

Via Composer

$ composer require kontoulis/rabbitmq-laravel

Add the Service Provider to config/app.php

Kontoulis\RabbitMQLaravel\RabbitMQLaravelServiceProvider::class,

Add the RabbitMQ facade to config/app.php

'RabbitMQ' => Kontoulis\RabbitMQLaravel\Facades\RabbitMQ::class,

Publish the configuration file and edit it if needed in config/rabbitmq-laravel.php

$ php artisan vendor:publish

Background

You can use the RabbitMQ facade to do anything as seen in https://github.com/php-amqplib/php-amqplib/blob/master/PhpAmqpLib/Channel/AMQPChannel.php . Basically, the RabbitMQ facade is AMQPChannel.

Usage

  • Publish Message to exchange
As a Facade
``` php
use PhpAmqpLib\Message\AMQPMessage;

$msg = new AMQPMessage('mypayload';         
RabbitMQ::basic_publish($msg, '', 'my-queue'));

## License

The MIT License (MIT). Please see [LICENCE.md](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/league/:package_name.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/thephpleague/:package_name/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/thephpleague/:package_name.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/thephpleague/:package_name.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/league/:package_name.svg?style=flat-square

About

A laravel package for RabitMQ management

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%