Download the PHP package edipoelwes/laravel-rabbitmq-worker without Composer
On this page you can find all versions of the php package edipoelwes/laravel-rabbitmq-worker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download edipoelwes/laravel-rabbitmq-worker
More information about edipoelwes/laravel-rabbitmq-worker
Files in edipoelwes/laravel-rabbitmq-worker
Package laravel-rabbitmq-worker
Short Description This project is a Laravel package that facilitates the execution of RabbitMQ worker processes. It simplifies the configuration, management, and monitoring of worker processes, allowing you to easily integrate RabbitMQ into your Laravel application to handle asynchronous tasks efficiently and scalably.
License MIT
Homepage https://github.com/edipoelwes/laravel-rabbitmq-worker
Informations about the package laravel-rabbitmq-worker
laravel-rabbitmq-worker
Library to facilitate the use of rabbitmq within php based on the php-amqplib library.
Installing
How to configure in Laravel
Run the publisher to generate configuration file
When you run the publisher command, it automatically creates a configuration file named laravel-rabbitmq-worker.php
within the config
directory of your Laravel application.
Clear settings cache
Before configuring the RabbitMQ connection settings according to your environment, it's essential to clear the Laravel configuration cache to ensure that any changes take effect properly.
Then just configure according to your environment.
Usage examples
Creating a simple publisher
Creating a consumer
Creating a Consumer Using QueueConsumerAbstract
You can create a consumer by extending the QueueConsumerAbstract
class. This approach allows you to handle messages in a structured way. Below is an example of how to implement a command that consumes messages from a RabbitMQ queue:
Creating a consumer into laravel command
Remote procedure call (RPC)
Configuration for RPC
For publishing and consuming with RPC, please ensure that the RabbitMQ class is configured with 'durable = false' and 'auto_delete = true' settings.
When setting up Remote Procedure Call (RPC) functionality, it's crucial to configure RabbitMQ appropriately to ensure seamless communication. For optimal performance and resource management, it's recommended to adjust the RabbitMQ settings with 'durable = false' and 'auto_delete = true'.
Creating a Consumer for RPC
Creating a Publisher for RPC
All versions of laravel-rabbitmq-worker with dependencies
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/console Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
php-amqplib/php-amqplib Version ^3.6