MesQ is a PHP lite disk based message queue manager
- Assemple and enqueue (un-)frequently (incoming) messages
- dequeue once (scheduled?)
MesQ supports FIFO, LIFO and PRIOrity message queues
Message can be any of scalar, array or object types
Requires (below)
- unique <queueName>
- existing read-/writeable <directory>
For the MesQ config keys, please review src/MesQinterface.php.
<?php
namespace Kigkonsult\MesQ;
require 'vendor/autoload.php';
...
$config = [
MesQ::QUEUENAME => <queueName>,
MesQ::DIRECTORY => <directory>,
MesQ::QUEUETYPE => MesQ::FIFO, // default
];
MesQ::factory( $config )
->push( <message> );
...
<?php
namespace Kigkonsult\MesQ;
require 'vendor/autoload.php';
...
$config = [
MesQ::QUEUENAME => <queueName>,
MesQ::DIRECTORY => <directory>,
MesQ::RETURNCHUNKSIZE => 1000
];
$mesQ = MesQ::factory( $config );
if( $mesQ->messageExists() {
while( $message = $mesQ->getMessage()) {
...
// process message, max 1000
...
} // end while
} // end if
...
For more detailed usage, read MesQ docs.
Composer, from the Command Line:
composer require kigkonsult/mesq
In your composer.json:
{
"require": {
"kigkonsult/mesq": "dev-master"
}
}
Version 1.6 supports PHP 8.0, 1.4 7.4, 1.2 7.0.
Donation using paypal.me/kigkonsult are appreciated. For invoice, e-mail.
MesQ is licensed under the LGPLv3 License.