Download the PHP package adamhutchison/laravel-mq-manager without Composer

On this page you can find all versions of the php package adamhutchison/laravel-mq-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mq-manager

Message Queue Manager For Laravel Microservices

Message queue manager (MQ Manager) is a package that allows asynchronous inter service messages to be sent by micro services built on the laravel framework.

By default the MQ managers uses RabbitMQ as the message broker using the following connection credentials:

host:localhost port:5672 username:guest password:guest

These can be be set manually via the following env values:

Installation

The package can then be installed using composer:

composer require adamhutchison/laravel-mq-manager

Then run the following command:

php artisan mq-manager:install

This will publish the mqmanager.php config file to the applications config folder

Then set the following environment variables in the applications .env file:

Basic usage

Sending Messages

By default MQ Manager will attempt to send messages to the queue defined in the MQ_MANAGER_QUEUE env variable, however you may also pass a custom queue name as a second parameter to the sendMessage() method on the MQManager class.

It's important to know that the MQManager class is a singleton so it should be resolved using Laravels service container rather than using the new operator

Basic Example:

Receiving Messages

You can listen for messages sent by other services using the listen() method on the MQManager class. By default MQ Manager will listen for messages sent to the queues registered with the registerQueueListener() method on the MQManager class. This method expects two parameter, the first is the name of the queue and the second is a closure that that the message will be passed to.

You may also pass in a custom queue and closure to the listen method. In this case only messages sent to the specified queue will be listened for, all queues subscribed to in the the mqmanager.php config will be ignored.

Basic Example

Automatic Messaging For Models Events

MQ Manager includes functionality that allows messages to be automatically sent to the when a model is created, updated or deleted. Simply add the MQManager\Events\ModelTraits\SendsMQMessages to any model that you wish messages to be broadcast for.

MQ Messenger will then send a message in the following format to the queue defined in the .env file

Listening For Model Events

MQ Manager provides the following artisan command for listening for model events php artisan mq-manager:listen. This artisan command can be started and monitored using supervisor (in the same way that queue worker would) to allow for model events to be detected from a different microservice.


All versions of laravel-mq-manager with dependencies

PHP Build Version
Package Version
Requires php-amqplib/php-amqplib Version ^2.10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adamhutchison/laravel-mq-manager contains the following files

Loading the files please wait ....