Skip to content

idanieldrew/esb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esb

Total Downloads Latest Version License

Esb support Pub/Sub in php and also support queue driver for Laravel.

Installation

Install with composer

composer require idanieldrew/esb

To publish the config

php artisan vendor:publish

and then select "esb-config" tag

Usage

Quick start

Publish

Publish messages with default exchange

use Idanieldrew\Esb\Facades\Esb;

// Publish message to queue
Esb::publish('queue','message'); 

Consume

Consume messages with default exchange

use Idanieldrew\Esb\Facades\Esb;

// Consume messages from queue
Esb::consume('queue', function ($message, $res) {
            var_dump($message->body);
        });

Consume messages from default queue in esb-config:

use Idanieldrew\Esb\Facades\Esb;

Esb::consume('', function ($message, $res) {
            var_dump($message->body);
        });

About

pub sub and queue driver for laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages