{"id":21278481,"url":"https://github.com/wdalmut/queue","last_synced_at":"2025-09-04T20:42:52.914Z","repository":{"id":56958158,"uuid":"79634613","full_name":"wdalmut/queue","owner":"wdalmut","description":"Adaptable queue layers","archived":false,"fork":false,"pushed_at":"2017-01-26T19:16:34.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T11:34:09.608Z","etag":null,"topics":["queue","queueing","rabbitmq","rabbitmq-client","sqs","sqs-interface","sqs-queue"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wdalmut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-21T08:50:06.000Z","updated_at":"2020-05-14T12:43:17.000Z","dependencies_parsed_at":"2022-08-21T04:40:16.806Z","dependency_job_id":null,"html_url":"https://github.com/wdalmut/queue","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wdalmut/queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdalmut","download_url":"https://codeload.github.com/wdalmut/queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fqueue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261065242,"owners_count":23104761,"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":["queue","queueing","rabbitmq","rabbitmq-client","sqs","sqs-interface","sqs-queue"],"created_at":"2024-11-21T10:14:32.272Z","updated_at":"2025-06-21T05:01:53.411Z","avatar_url":"https://github.com/wdalmut.png","language":"PHP","readme":"# Queue\n\nAdaptable queue layers\n\n[![Build Status](https://travis-ci.org/wdalmut/queue.svg?branch=master)](https://travis-ci.org/wdalmut/queue)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wdalmut/queue/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wdalmut/queue/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/wdalmut/queue/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wdalmut/queue/?branch=master)\n\n## Create\n\n```php\n$queue = new Queue(\"queue name\", $queueAdapter);\n```\n\n[Check also the wiki](https://github.com/wdalmut/queue/wiki)\n\n### Available Adapters\n\n * AWS SQS [https://github.com/wdalmut/queue-sqs](https://github.com/wdalmut/queue-sqs)\n * RabbitMQ [https://github.com/wdalmut/queue-rabbitmq](https://github.com/wdalmut/queue-rabbitmq)\n * MySQL [https://github.com/wdalmut/queue-mysql](https://github.com/wdalmut/queue-mysql)\n * Internal array [https://github.com/wdalmut/queue-array](https://github.com/wdalmut/queue-array)\n * [_send an issue/pr to add your adapter here..._](#interface)\n\n## Receive from queue\n\n```php\nlist($receipt, $message) = $queue-\u003ereceive();\n\n// receive with options\nlist($receipt, $message) = $queue-\u003ereceive([\"timeout\" =\u003e 15*60]);\n```\n\n## Send in queue\n\n```php\n$queue-\u003esend(\"my message\");\n\n// send with options\n$queue-\u003esend(\"my message\", [\"delay\" =\u003e 20]);\n```\n\n## Delete from queue\n\n```php\n$queue-\u003edelete($receipt);\n\n// delete with options\n$queue-\u003edelete($receipt, [\"delay\" =\u003e 20]);\n```\n\n## Manage different adapters options\n\nJust use functions\n\n```php\n$queue = new Queue(\"https://sqs.amazon.com/39857/urs\", $sqsAdapter);\n$queue-\u003esend(\"message\", toSQS([\"delay\" =\u003e 20]));\n\nfunction toSQS(array options = []) {\n    $opts = [];\n    if (array_key_exists(\"delay\", $options)) {\n        $opts[\"DelaySeconds\"] = $options[\"delay\"];\n    }\n    return $opts;\n}\n```\n\n# Queue Interface (for adapters) \u003ca name=\"interface\"\u003e\u003c/a\u003e\n\nYou have to implement 3 methods from `Corley\\Queue\\QueueInterface`\n\n```php\npublic function send($queueName, $message, array $options);\npublic function receive($queueName, array $options);\npublic function delete($queueName, $receipt, array $options);\n```\n\n# Tips on return values (`receive` message)\n\nAs you can see the return value\n\n * The send operation should return the queue send operation status\n * The receive *MUST* return an array where the first parameter is the message\n   receipt that is need for the remove operation\n * The delete operation should return the queue delete operation status\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdalmut%2Fqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdalmut%2Fqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdalmut%2Fqueue/lists"}