Implemented RabbitMQ and Refactored Client & Worker (WIP)

This commit is contained in:
Netkas 2023-02-02 21:09:45 -05:00
parent d15da30813
commit 6d8d4a75a4
13 changed files with 966 additions and 170 deletions

18
tests/rabbitmq_client.php Normal file
View file

@ -0,0 +1,18 @@
<?php
use Tamer\Objects\Task;
require 'ncc';
import('net.nosial.tamerlib', 'latest');
$client = new \Tamer\Protocols\RabbitMq\Client('guest', 'guest');
$client->addServer('127.0.0.1', 5672);
// Loop through 10 tasks
for($i = 0; $i < 500; $i++)
{
$client->do(new Task('sleep', '5'));
}