Download the PHP package vrnvgasu/php-rabbit-handler without Composer

On this page you can find all versions of the php package vrnvgasu/php-rabbit-handler. 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 php-rabbit-handler

php-rabbit-handler

composer require vrnvgasu/php-rabbit-handler

Look examples in ./Examples.

Connection

Create new connection.

Queue

Create new queue.

Pass '' as the first variable if you need a unique queue from rabbit.

Exchange

Create new exchange.

Bind queue and exchange

Create new binding.

You can create pass routing key in your binding.

Then you must to create helper and pass him $connection, $queue, $exchange and $binding.

Consuming

Create new consume.

You can pass callback function in Consume constructor to handle message from rabbit

Or you can extend your consumer class from Consumer and declare callback method.

Then you must to create consumer and pass him $helper and $consume.

Then call method execute.

If you want to interrupt the execution of the handler after a while, then use:

This will interrupt execution after the specified time after processing the last message.

Producing

Create new publication.

Then you must to create producer and pass him $helper and $publication.

You need payload for your producer. Producer can get payload from objects which implements JobInterface.

You can pass your job object to Producer object

Or you can pass producer to the method execute.

Job

Prepare payload for producer.

Dispatch

At the first you need to transfer data for preparation to dispatch.

Class declaration

Your TestJob must extends from Job

Handling

In TestJob you must to declare method handle with params which you pass in dispatch. handle will execute in dispatch.


All versions of php-rabbit-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
php-amqplib/php-amqplib Version >=3.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 vrnvgasu/php-rabbit-handler contains the following files

Loading the files please wait ....