{"id":16078332,"url":"https://github.com/prolic/humusamqp","last_synced_at":"2025-04-06T16:13:59.149Z","repository":{"id":48118451,"uuid":"48622236","full_name":"prolic/HumusAmqp","owner":"prolic","description":"PHP 7.4 AMQP library","archived":false,"fork":false,"pushed_at":"2023-09-25T08:14:06.000Z","size":1718,"stargazers_count":76,"open_issues_count":5,"forks_count":17,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-30T15:08:05.191Z","etag":null,"topics":["amqp","json-rpc","messaging","php","php-amqp","php-amqplib","php7","rabbitmq"],"latest_commit_sha":null,"homepage":"https://humusamqp.readthedocs.io/","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/prolic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"patreon":"prolic"}},"created_at":"2015-12-26T20:07:03.000Z","updated_at":"2024-02-07T22:55:03.000Z","dependencies_parsed_at":"2024-06-18T16:17:13.617Z","dependency_job_id":"216aac44-e1bd-434b-a10b-4697e185def3","html_url":"https://github.com/prolic/HumusAmqp","commit_stats":{"total_commits":502,"total_committers":14,"mean_commits":"35.857142857142854","dds":"0.20119521912350602","last_synced_commit":"c6649b7a3e29b6e554c92375d47dd56e1bea39bf"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolic%2FHumusAmqp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolic%2FHumusAmqp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolic%2FHumusAmqp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolic%2FHumusAmqp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prolic","download_url":"https://codeload.github.com/prolic/HumusAmqp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509237,"owners_count":20950232,"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":["amqp","json-rpc","messaging","php","php-amqp","php-amqplib","php7","rabbitmq"],"created_at":"2024-10-09T10:11:43.638Z","updated_at":"2025-04-06T16:13:59.127Z","avatar_url":"https://github.com/prolic.png","language":"PHP","funding_links":["https://patreon.com/prolic"],"categories":[],"sub_categories":[],"readme":"# Humus Amqp\n\nPHP 7.4 AMQP library\n\n[![Build Status](https://travis-ci.org/prolic/HumusAmqp.svg?branch=master)](https://travis-ci.org/prolic/HumusAmqp)\n[![Coverage Status](https://coveralls.io/repos/github/prolic/HumusAmqp/badge.svg?branch=master)](https://coveralls.io/github/prolic/HumusAmqp?branch=master)\n[![Gitter](https://badges.gitter.im/prolic/HumusAmqp.svg)](https://gitter.im/prolic/HumusAmqp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Documentation Status](https://readthedocs.org/projects/humusamqp/badge/?version=latest)](https://readthedocs.org/projects/humusamqp/badge/?version=latest)\n\n## [Documentation](https://humusamqp.readthedocs.io/) powered by Read the Docs.\n\n## Overview\n\nPHP 7.4+ AMQP libray supporting multiple drivers and providing full-featured Consumer, Producer, and JSON-RPC Client / Server implementations.\n\nThe JSON-RPC part implements [JSON-RPC 2.0 Specification](http://www.jsonrpc.org/specification).\n\nCurrent supported drivers are: [php-amqp](https://github.com/pdezwart/php-amqp) and [PhpAmqpLib](https://github.com/php-amqplib/php-amqplib).\n\nphp-amqp needs at least to be v1.9.3\nphp-amqplib needs at least to be v3\n\nThis library ships with `psr/container` factories that help you setting up everything.\n\n## Zend Framework and Symfony Framework Integration\n\n- [ZF Module](https://github.com/prolic/HumusAmqpModule)\n- [Symfony Bundle](https://github.com/genhoi/HumusAmqpBundle)\n\n## Installation\n\nYou can install prolic/humus-amqp via composer by adding `\"prolic/humus-amqp\": \"^2.0\"` as requirement to your composer.json.\n\n## Usage\n\n### Exchange\n\n    $exchangeName = 'test-exchange';\n    $exchange = ExchangeFactory::$exchangeName($container);\n\n    $exchange-\u003epublish('test-message');\n\n### Queue\n\n    $queueName = 'test-queue';\n    $queue = QueueFactory::$queueName($container);\n\n    $message = $queue-\u003eget();\n    $queue-\u003eack($message-\u003egetDeliveryTag());\n\n### Producer\n\n    $producerName = 'test-producer';\n    $producer = ProducerFactory::$producerName($container);\n\n    $producer-\u003econfirmSelect();\n    $producer-\u003epublish(['foo' =\u003e 'bar'], 'my-routing-key');\n    $producer-\u003ewaitForConfirm();\n\n### JSON RPC Client\n\n    $clientName = 'my-client';\n    $client = JsonRpcClientFactory::$clientName($container);\n    $client-\u003eaddRequest(new JsonRpcRequest('my-server', 'method', ['my' =\u003e 'params'], 'id-1'));\n    $client-\u003eaddRequest(new JsonRpcRequest('my-server', 'method', ['my' =\u003e 'other_params'], 'id-2'));\n    $responseCollection = $client-\u003egetResponseCollection();\n\n### JSON RPC Server\n\n    $serverName = 'my-server';\n    $server = JsonRpcServerFactory::$serverName($container);\n    $server-\u003econsume();\n\n## Notes\n\n### Upgrade from 1.x to 1.4\n\nBefore: If `auto_setup_fabric` was enabled, the queue and exchange binding was done automatically. The exchanges would also get created. Anonymous queues required to have `auto_setup_fabric` set to true.\n\nNew: If `auto_setup_fabric` is enabled or the queue is anonymous (has no name), the queue gets created and binding is done, but no exchanges are created. If you want to enable creating of depending exchanges (including exchange binding), set the new argument `auto_setup_exchanges` to true.\n\nThis is a slight BC break, but the old behaviour was so problematic, that I had to make this change either way.\n\n### AMQP-Extension\n\n1. We recommend using php-amqp \u003e=v1.9.3 or compiling it from master, if you encounter any problems with the amqp extension, check\n   their issue tracker, first.\n\nThe ext-amqp driver is the most performant.\n\n### PhpAmqpLib\n\n1. When using php-amqplib as driver, it's worth point out, that a StreamConnection (same goes for SSLConnection) does not\n   have the possibility to timeout. If you want to let the consumer timeout, when no more messages are received, you should\n   use the SocketConnection instead (assuming you don't need an SSL connection).\n\n2. When using php-amqplib as driver and you're using the LazyConnection, you should not create the channel yourself, call\n   instead `$channel = $connection-\u003enewChannel()`\n\n## Support\n\n- File issues at [https://github.com/prolic/HumusAmqp/issues](https://github.com/prolic/HumusAmqp/issues).\n- Say hello in the [HumusAmqp gitter](https://gitter.im/prolic/HumusAmqp) chat.\n\n## Contribute\n\nPlease feel free to fork and extend existing or add new plugins and send a pull request with your changes!\nTo establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.\n\n## License\n\nReleased under the [MIT](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolic%2Fhumusamqp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprolic%2Fhumusamqp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolic%2Fhumusamqp/lists"}