Download the PHP package balpom/symfony-messenger-and-workerman without Composer

On this page you can find all versions of the php package balpom/symfony-messenger-and-workerman. 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 symfony-messenger-and-workerman

symfony-messenger-and-workerman

A simple example showing how to use Workerman and a Symfony Messenger with queues.

Not finding a simple and complete example of using the Symfony Messenger, I create it myself: https://github.com/balpom/symfony-messenger-sample. It use Doctrine with sqlite database as Message Bus transport and for Workers running it use Symfony Console.

However, my inner perfectionist :-) does not like the idea, when manually open the console, run a script in it, etc. I wanted to use a single command to open several consoles at once in the right amount, in which the worker's would already be working, and if one of the workers fell, the console was restarting itself (a set number of running consoles (scripts) was supported).

As a result, I created a new example, in which I completely abandoned the symfony/console component, and for Workers starting and for maintaining a set number of them, I use Workerman framework (https://github.com/walkor/workerman).

Everything was tested in Linux.

Requirements

Installation

Using composer (recommended)

How to use

Open console window. Run the command:

It starts three simple Worker, which imitate SMS sending. Now it is waiting for messages to be sent from the queue, which is still empty.

Run the command:

It runs a simple script that adds some several messages to the queue. After this, in previously automatically opened consoles you may see, how several Workers "sending" SMS.

Run the command:

It runs a simple script that adds many several messages to the queue.

Run the command:

It reloads all Workers. After reloading all Workers continue execution.

Run the command:

It stop all Workers executions.

Specificity

Created by me SymfonyWorker class is a wrapper for Symfony\Component\Messenger\Worker and built on the base of the ConsumeMessagesCommand class (Symfony\Component\Messenger\Command\ConsumeMessagesCommand).

For Workerman\Worker running I created very simple script bin/runner:

It has line If you don't have gnome-terminal in your system, you must replace this line to the line, that runs the command "php bin/start_worker" for your terminal.

Also you may run, stop and reload workers directly from "bin/runner" script by this commands:

For current status checking try this command:


All versions of symfony-messenger-and-workerman with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
php-di/php-di Version >=7.0
workerman/workerman Version >=4.1
symfony/messenger Version >=6.4
symfony/doctrine-messenger Version >=6.4
symfony/rate-limiter Version >=6.4
symfony/cache Version >=6.4
symfony/event-dispatcher Version >=6.4
symfony/process Version >=6.4
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 balpom/symfony-messenger-and-workerman contains the following files

Loading the files please wait ....