{"id":20540564,"url":"https://github.com/utopia-php/queue","last_synced_at":"2026-02-02T13:28:19.842Z","repository":{"id":43972052,"uuid":"472540336","full_name":"utopia-php/queue","owner":"utopia-php","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-18T10:59:43.000Z","size":263,"stargazers_count":9,"open_issues_count":5,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T22:11:10.611Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/utopia-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-21T23:00:11.000Z","updated_at":"2025-03-13T12:22:46.000Z","dependencies_parsed_at":"2023-01-21T19:15:13.987Z","dependency_job_id":"19691652-46fc-42ea-80d9-335153a4e819","html_url":"https://github.com/utopia-php/queue","commit_stats":{"total_commits":60,"total_committers":5,"mean_commits":12.0,"dds":0.5166666666666666,"last_synced_commit":"310271c5cd477541208d7fa74a4dea64df8e04a0"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utopia-php%2Fqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utopia-php","download_url":"https://codeload.github.com/utopia-php/queue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248847388,"owners_count":21171174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-11-16T01:16:13.760Z","updated_at":"2025-12-24T10:27:08.182Z","avatar_url":"https://github.com/utopia-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Utopia Queue\n\n[![Build Status](https://travis-ci.com/utopia-php/queue.svg?branch=main)](https://travis-ci.com/utopia-php/queue)\n![Total Downloads](https://img.shields.io/packagist/dt/utopia-php/queue.svg)\n[![Discord](https://img.shields.io/discord/564160730845151244?label=discord)](https://appwrite.io/discord)\n\nUtopia Queue is a powerful Queue library. This library is aiming to be as simple and easy to learn and use. This library is maintained by the [Appwrite team](https://appwrite.io).\n\nAlthough this library is part of the [Utopia Framework](https://github.com/utopia-php/framework) project it is dependency free and can be used as standalone with any other PHP project or framework.\n\n## Getting Started\n\nInstall using composer:\n\n```bash\ncomposer require utopia-php/queue\n```\n\nInit in your application:\n\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/../../vendor/autoload.php';\n\n// Create a worker using the Swoole adapter\nuse Utopia\\Queue;\nuse Utopia\\Queue\\Message;\n\n$connection = new Queue\\Connection\\Redis('redis');\n\nif ($connection-\u003eping()) {\n    var_dump('Connection is ready.');\n} else {\n    var_dump('Connection is not ready.');\n}\n\n$adapter = new Queue\\Adapter\\Swoole($connection, 12, 'my-queue');\n$server = new Queue\\Server($adapter);\n\n$server\n    -\u003ejob()\n    -\u003einject('message')\n    -\u003eaction(function (Message $message) {\n        var_dump($message);\n    });\n\n$server\n    -\u003eerror()\n    -\u003einject('error')\n    -\u003eaction(function ($error) {\n        echo $error-\u003egetMessage() . PHP_EOL;\n    });\n\n$server\n    -\u003eworkerStart()\n    -\u003eaction(function () {\n        echo \"Worker Started\" . PHP_EOL;\n    });\n\n$server-\u003estart();\n\n\n// Enqueue messages to the worker using the Redis adapter\n$connection = new Redis('redis', 6379);\n$client = new Client('my-queue', $connection);\n\n$client-\u003eenqueue([\n    'type' =\u003e 'test_number',\n    'value' =\u003e 123\n]);\n```\n\n## System Requirements\n\nUtopia Framework requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible.\n\n## Copyright and license\n\nThe MIT License (MIT) [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futopia-php%2Fqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futopia-php%2Fqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futopia-php%2Fqueue/lists"}