{"id":19621575,"url":"https://github.com/pkg6/think-queue-amqp","last_synced_at":"2025-06-17T04:06:02.245Z","repository":{"id":57080397,"uuid":"488377414","full_name":"pkg6/think-queue-amqp","owner":"pkg6","description":"amqp(RabbitMQ) connector for think-queue","archived":false,"fork":false,"pushed_at":"2023-01-04T08:29:35.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-23T21:36:37.027Z","etag":null,"topics":[],"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/pkg6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-03T22:11:59.000Z","updated_at":"2024-10-05T00:33:55.000Z","dependencies_parsed_at":"2023-02-02T05:16:11.737Z","dependency_job_id":null,"html_url":"https://github.com/pkg6/think-queue-amqp","commit_stats":null,"previous_names":["tp5er/think-queue-amqp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pkg6/think-queue-amqp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fthink-queue-amqp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fthink-queue-amqp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fthink-queue-amqp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fthink-queue-amqp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkg6","download_url":"https://codeload.github.com/pkg6/think-queue-amqp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fthink-queue-amqp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260288462,"owners_count":22986666,"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":[],"created_at":"2024-11-11T11:23:35.902Z","updated_at":"2025-06-17T04:06:02.217Z","avatar_url":"https://github.com/pkg6.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n## Amp(RabbitMq)\n\n\u003e\n\u003e 支持阿里云 账号密码-\u003e实例列表-\u003e静态用户名密码\n\n\n~~~\n'amqp'   =\u003e [\n    'type'    =\u003e 'amqp',\n    'queue'   =\u003e 'thinkphp',\n    'hosts'   =\u003e [\n          [\n          'host'     =\u003e '127.0.0.1',\n          'port'     =\u003e 5672,\n          'user'     =\u003e 'guest',\n          'password' =\u003e 'guest',\n          'vhost'    =\u003e '/',\n          ],\n    \t\t],\n    'options' =\u003e [\n        'ssl_options' =\u003e [\n        'ssl_on'      =\u003e false,\n        'cafile'      =\u003e null,\n        'local_cert'  =\u003e null,\n        'local_key'   =\u003e null,\n        'verify_peer' =\u003e true,\n        'passphrase'  =\u003e null,\n        ],\n    ],\n],\n\n~~~\n\n## 发布任务\n\n\u003e `think\\facade\\Queue::push($job, $data = '', $queue = null)` 和 `think\\facade\\Queue::later($delay, $job, $data = '', $queue = null)` 两个方法，前者是立即执行，后者是在`$delay`秒后执行\n\n```\n$job` 是任务名\n单模块的，且命名空间是`app\\job`的，比如上面的例子一,写`Job1`类名即可\n多模块的，且命名空间是`app\\module\\job`的，写`model/Job1`即可\n其他的需要些完整的类名，比如上面的例子二，需要写完整的类名`app\\lib\\job\\Job2`\n如果一个任务类里有多个小任务的话，如上面的例子二，需要用@+方法名`app\\lib\\job\\Job2@task1`、`app\\lib\\job\\Job2@task2\n```\n\n`$data` 是你要传到任务里的参数\n\n`$queue` 队列名，指定这个任务是在哪个队列上执行，同下面监控队列的时候指定的队列名,可不填\n\n## 监听任务并执行\n\n```\n\u0026\u003e php think queue:listen\n\n\u0026\u003e php think queue:work\n```\n\n两种，具体的可选参数可以输入命令加 `--help` 查看\n\n## 更多使用\n\n\u003e 详情请查看官方文档说明 https://github.com/top-think/think-queue/tree/3.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Fthink-queue-amqp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkg6%2Fthink-queue-amqp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Fthink-queue-amqp/lists"}