Download the PHP package happyr/mq2php-bundle without Composer

On this page you can find all versions of the php package happyr/mq2php-bundle. 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 mq2php-bundle

Mq2phpBundle for real asynchronous messages

Latest Version Build Status Code Coverage Quality Score Total Downloads

This bundle is a bridge between SimpleBus and mq2php. It could be used together with the SimpleBusAsynchronousBundle to make the asynchronous messages independent of a cron job to consume the messages. Instead we utilize the power of PHP-FPM to schedule workload and resources.

Consuming messages from the queue

We do not want to run a cron command to consume messages from the queue because of two reasons. It takes a lot of computer resources to create a new thread and if we only do one task there will be a lot of overhead. The second reason is that we want to be able to do resource scheduling. With a cronjob we say "Consume this message at the next minute no matter your current load". Instead we would like to do something like: "Consume this message as soon as possible".

The solution to these problems is nothing new. It is actually exact the problems PHP-FPM is solving. We just need a way to pull messages from the message queue and give those to PHP-FPM.

This is where mq2php comes in. It is a Java application that will run in the background. Java is preferred because it is build to run for ever. (Compared with PHP that should never be running for more than 30 seconds.)

Installation

Fetch mq2php.jar version 0.5.0 or above and start the application with:

You should consider using the init script when you using it on the production server.

Install and enable this bundle

Configuration

HTTP executor

If you are not using fastcgi (eg PHP-FPM) you may use HTTP.

Shell executor

When debugging you may want to use the shell executor. This will require more CPU resources by mq2php since starting a new process to for each message is heavy.

Verify the message

If you want to be sure that your message is valid and from your application you should define a secret key. This key is used to hash the message and then verify the hash on the receiving end. If you are using multiple applications you should make sure they all have the same secret key.

Reduce the number of messages

In the SimpleBus documentation you may find that all events will be handled synchronous then asynchronous. That means that for every event your application dispatches there will be an async message. If you want to reduce the number of messages you may configure the SimpleBus AsyncBundle to only handle those events that are marked as asynchronous.


All versions of mq2php-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
psr/log Version ~1.0
simple-bus/asynchronous-bundle Version ^3.0
symfony/dependency-injection Version ^3.4 || ^4.0
symfony/http-kernel Version ^3.4 || ^4.0
symfony/framework-bundle Version ^3.4 || ^4.0
symfony/console Version ^3.4 || ^4.0
symfony/event-dispatcher Version ^3.4 || ^4.0
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 happyr/mq2php-bundle contains the following files

Loading the files please wait ....