Download the PHP package alifcoder/laravel-rabbitmq without Composer

On this page you can find all versions of the php package alifcoder/laravel-rabbitmq. 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-rabbitmq

laravel-rabbitmq

Simple RabbitMQ client for Laravel with pub/sub and RPC-style request/response support.

Installation

The service provider and Rabbit facade are auto-discovered. Publish the config:

Configuration

config/rabbitmq.php:

Key Env var Default
host RABBITMQ_HOST localhost
port RABBITMQ_PORT 5672
user RABBITMQ_USER guest
password RABBITMQ_PASSWORD guest
rpc_timeout RABBITMQ_RPC_TIMEOUT 10 (seconds)
default_queue RABBITMQ_DEFAULT_QUEUE msgs

What the package provides vs. what you write

Alif\LaravelRabbitmq\Client is a thin, low-level primitive: connection/channel management, publish(), request()->getResult(), and a consume(queue, callback)->wait() pair where you get the raw PhpAmqpLib\Message\AMQPMessage and are responsible for acknowledging it yourself.

There's no handler registry, method dispatch, or dead-letter routing built into the package — that's application logic, not library logic. examples/ shows one way to build it: a RabbitHandler class (dispatched to by method name, with BaseDto auto-hydrating typed parameters from the message params) plus a RabbitConsume command that wires it up, RPC replies included. Copy it into your project and adjust it to taste — see "Consuming" below.

Usage

rabbit() helper (recommended)

rabbit(string $method, array $params = [], ?string $queue = null): Rabbit returns a Alif\LaravelRabbitmq\Rabbit instance — call ->publish() or ->getResult() on it.

Facade

The same operations are available on the Rabbit facade, which proxies the underlying Alif\LaravelRabbitmq\Client singleton directly:

Both throw RuntimeException if an RPC request gets no reply within rpc_timeout seconds.

Consuming

examples/Console/Commands/RabbitConsume.php wraps this in a full rabbit:consume artisan command — method/DTO dispatch to a RabbitHandler, RPC replies, and per-message error handling included. Copy it into your project:

Laravel auto-discovers commands under app/Console/Commands/, so php artisan rabbit:consume works immediately once it's there — no registration needed.


All versions of laravel-rabbitmq with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
php-amqplib/php-amqplib Version ^3.7
ramsey/uuid Version ^4.2
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 alifcoder/laravel-rabbitmq contains the following files

Loading the files please wait ...