fivelab/amqp
Composer 安装命令:
composer require fivelab/amqp
包简介
The library for publish/receive messages from broker (RabbitMQ).
关键字:
README 文档
README
#StandWithUkraineEvent Broker: AMQP
This library for receive events from RabbitMQ and publish messages to AMQP.
Why this?
In many application we must use background processes for process any data or create/update/delete any entries. For this, we use AMQP and RabbitMQ. But, in base implementation of AMQP (PHP Extension and PHPAmqpLib) we have some problems:
- We should connect to RabbitMQ before create the exchange or queue. But in our logic (in controller as an example) we don't need to send message rabbitmq.
- All options for declare exchanges or queues set as flags, and it can be difficult for understanding and typos.
We full isolate this processes in this library for easy send message to exchange and easy receive the messages from queues.
Definitions
All entries of AMQP have a custom definition. Each definition have custom parameters for declare the exchange or queue.
Factories
All entries of AMQP have a factory. It allow to create the real instances only on usage process.
Adapters
We create a library with able to support any adapters for connect to broker. Out-of-the-box supported drivers are:
ext-amqp- composer php-amqplib
Documentation
All documentation stored in /docs/ directory.
Development
For easy development you can use the Docker.
docker compose up
docker compose exec amqp bash
After success run and attach to container you must install vendors:
composer update
Before create the PR or merge into develop, please run next commands for validate code:
./bin/phpunit ./bin/phpcs --config-set show_warnings 0 ./bin/phpcs --standard=vendor/escapestudios/symfony2-coding-standard/Symfony/ src/ ./bin/phpcs --standard=tests/phpcs-ruleset.xml tests/
fivelab/amqp 适用场景与选型建议
fivelab/amqp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33.31k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 11 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「event」 「publisher」 「receiver」 「broker」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fivelab/amqp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fivelab/amqp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fivelab/amqp 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A drop-in webhook handling library for Laravel
Build persistence-agnostic storage layer.
Bridge between JMS Serializer Bundle and Superdesk Web Publisher.
The bundle for integrate fivelab/amqp library with Symfony application
Scope and owner aware settings system. Define settings in configuration, keep customized values in storage.
Business rules engine tools.
统计信息
- 总下载量: 33.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 11
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-09