{"id":19112547,"url":"https://github.com/xbyter/amqp-rabbitmq","last_synced_at":"2026-06-24T07:31:52.392Z","repository":{"id":176917679,"uuid":"659717615","full_name":"xbyter/amqp-rabbitmq","owner":"xbyter","description":"rabbitmq client for php","archived":false,"fork":false,"pushed_at":"2023-06-30T10:06:31.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-18T20:32:04.973Z","etag":null,"topics":["amqp","amqp-client","ci-rabbitmq","laravel-rabbitmq","php-amqp","php-rabbitmq","rabbit","rabbitmq","rabbitmq-client","smyfony-rabbitmq","thinkphp-rabbitmq","yii-rabbitmq"],"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/xbyter.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-28T12:11:33.000Z","updated_at":"2023-06-28T12:17:10.000Z","dependencies_parsed_at":"2024-11-11T20:02:13.354Z","dependency_job_id":null,"html_url":"https://github.com/xbyter/amqp-rabbitmq","commit_stats":null,"previous_names":["xbyter/amqp-rabbitmq"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xbyter/amqp-rabbitmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbyter%2Famqp-rabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbyter%2Famqp-rabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbyter%2Famqp-rabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbyter%2Famqp-rabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xbyter","download_url":"https://codeload.github.com/xbyter/amqp-rabbitmq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbyter%2Famqp-rabbitmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34722676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["amqp","amqp-client","ci-rabbitmq","laravel-rabbitmq","php-amqp","php-rabbitmq","rabbit","rabbitmq","rabbitmq-client","smyfony-rabbitmq","thinkphp-rabbitmq","yii-rabbitmq"],"created_at":"2024-11-09T04:33:27.390Z","updated_at":"2026-06-24T07:31:52.356Z","avatar_url":"https://github.com/xbyter.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amqp-rabbitmq\n\n# 说明\n该库对`php-amqplib`做了层封装，使得业务上使用更加简便。原生态编写，可以支持各类框架。\n\n# 示例\n详见`examples/run.php`\n\n```php\n/** 以下是示例，根据实际情况可使用依赖注入，supervisor等方式优化 **/\n\n$configs = require \"examples/amqp.config.php\";\n\n$consumers = $configs['consumers'];\n$connections = $configs['connections'];\n\n//创建连接管理器\n$connectionManage = \\Examples\\ConnectionManageBuilder::buildFromConnections($connections);\n\n//创建exchange和queue并绑定他们之间的关系\n$declarer = new \\Xbyter\\Amqp\\Declarer($connectionManage);\nforeach ($connections as $connName =\u003e $connConfig) {\n    $declarer-\u003esetExchanges($connName, $connConfig['declarer']['exchanges'] ?? []);\n    $declarer-\u003esetQueues($connName, $connConfig['declarer']['queues'] ?? []);\n    $declarer-\u003esetBinds($connName, $connConfig['declarer']['binds'] ?? []);\n}\n$declarer-\u003ecreateAndBind();\n\n//发布消息\n$producer = new \\Xbyter\\Amqp\\Producer($connectionManage);\n$producer-\u003epublish(new \\Examples\\DefaultConn\\Producers\\DemoProducer('消息参数1', '消息参数2', '...'));\n\n//消费指定消费者消息\n$consumer = new \\Xbyter\\Amqp\\Consumer($connectionManage);\n$consumer-\u003econsume(new \\Examples\\DefaultConn\\Consumers\\DemoConsumer());\n\n//启动消费服务（建议使用supervisor等进程管理工具）\n$consumerServer = new \\Examples\\ConsumerServer($consumer);\n$consumerServer-\u003erun($consumers);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbyter%2Famqp-rabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbyter%2Famqp-rabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbyter%2Famqp-rabbitmq/lists"}