Download the PHP package assegaiphp/rabbitmq without Composer

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

Assegai Logo

Latest release Tests PHP 8.4+ License Status active

RabbitMQ queue support for AssegaiPHP applications.

Description

This package integrates RabbitMQ with AssegaiPHP through PhpAmqpLib. It serializes queued domain jobs, hydrates them for typed processors, and settles deliveries according to the processor outcome.

Contribution workflow

For commit and pull request conventions in this repo, see:

Installation

Install the package with Composer:

Compatibility

RabbitMQ package AssegaiPHP Common
>=1.1.2 <2.0 ^0.10.1
1.1.1 ^0.10.1
1.1.0 ^0.10.0
1.0.x ^0.9.0

Upgrade this package and its coordinated first-party dependencies together when moving between AssegaiPHP release lines.

Configuration

Register the driver and its connections in config/queues.php:

Queue references use the driver.connection format, such as rabbitmq.notifications.

Creating or injecting a queue is configuration-only. The driver opens the AMQP connection, declares the queue, and configures its exchange binding on the first broker operation. This allows an HTTP application to boot while RabbitMQ is temporarily unavailable; the operation that needs RabbitMQ receives the connection error and a later operation can retry.

Manual acknowledgement is the safe default. A successful processor call acknowledges the delivery. A decoding or processor failure nacks it and requeues it unless requeue_on_failure is false.

When exchange_name is non-empty, the driver declares that exchange and binds the queue using routing_key. With an empty exchange name, it publishes directly to the queue name.

Producing jobs

Inject a configured queue using #[InjectQueue] and add a domain job:

The driver writes a versioned JSON envelope containing the job class and payload.

Consuming jobs

Define an injectable processor whose method declares the job type it accepts:

Register the processor in its module's provider list so the Console can discover it. The worker validates the envelope class against the processor parameter and hydrates the domain object before invocation. Legacy JSON messages are hydrated when the processor declares a concrete class; a processor typed only as object receives stdClass.

Generate a processor with the Console when you want a starter class:

Running workers

Discover and run queue processors with the Assegai Console:

Process at most one available job and exit with --once:

If multiple processors target the same queue, use --processor to select one. See the AssegaiPHP queue guide for application-level worker guidance.

Testing

Run the package test suite with Composer:

Resources

Support

Assegai is an MIT-licensed open source project. It can grow thanks to sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Assegai is MIT licensed.


All versions of rabbitmq with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
assegaiphp/common Version ^0.10.1
php-amqplib/php-amqplib Version ^3.7
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 assegaiphp/rabbitmq contains the following files

Loading the files please wait ...