PHPackages                             ozaretskii/php-snake-mqp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. ozaretskii/php-snake-mqp

ActiveLibrary[Queues &amp; Workers](/categories/queues)

ozaretskii/php-snake-mqp
========================

PHP async messages queueing and processing library

v0.2.0-beta(3y ago)05[2 issues](https://github.com/ozaretskii/php-snake-mqp/issues)BSD-3-ClausePHPPHP &gt;=5.6

Since Jul 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ozaretskii/php-snake-mqp)[ Packagist](https://packagist.org/packages/ozaretskii/php-snake-mqp)[ Docs](https://packagist.org/packages/ozaretskii/php-snake-mqp)[ RSS](/packages/ozaretskii-php-snake-mqp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP async messages queueing and processing library
==================================================

[](#php-async-messages-queueing-and-processing-library)

SnakeMQP is a library for running and managing php tasks asynchronously via queues. You can simpy integrate async execution any part of your code with just a couple of minutes of work. This library provides you with all necessary tools to just start enjoying aync tasks processing out of the box, or building more complex and scalable task management system on top of it.

Ofter our code execution require more time or resources that we can afford on per same http request basis. In that case moving parts of most heavy or time-consuming operations on background can be an obvious solution. Background execution allows you to process multiple tasks per same time by using multiple workers, or simultaneous "chain" (placing next task to queue after current is finished) tasks execution, when an order of execution is critically important.

You can simply manage many types of your tasks by placing them into separated queue names and assigning priorities for any specific task or a queue. Delayed execution can also be handy in some specific cases. Dedicated workers for processing specific queue names can allow you to immediately process important tasks besides other queues to make sure that critically important parts of your project is always running on time.

SnakeMQP allows you to make any number and type of independent "workers" that can be called from project code, cli or rest api. That means you can integrate asynchronous execution of any part of your code even been limited to low level server access. Your workers can be triggered by simple crontab script, CURL, external authorized API call or unix daemon (like Supervisor or Systemd).

Benefits of using SnakeMQP:
---------------------------

[](#benefits-of-using-snakemqp)

- Easy integration in any php based project
- Highly manageable queueing system
- Delayed execution of tasks
- Having a dedicated workers to process specific queues or tasks with specific priority only
- Dynamic integration of "workers" to meet your project needs

Quick Examples
--------------

[](#quick-examples)

### Placing tasks for further processing (mysql based queue)

[](#placing-tasks-for-further-processing-mysql-based-queue)

```
