brave-sir-robin/amqphp
Composer 安装命令:
composer require brave-sir-robin/amqphp
包简介
AMQP 0.9.1 Protocol Implementation in pure PHP
README 文档
README
AMQPHP Notes.
------------
Robin Harvey, 2011
Amqphp is a complete Amqp protocol implementation and a set of
libraries for writing Amqp producers and consumers. Amqphp uses a
high performance asynchronous processing model to receive messages
using an event loop, and supports SSL broker connections. Another
notable feature is support for persistent connetions, this can help
make connections between Amqp brokers and web servers more efficient
by avoiding the TCP / Amqp connection setup for each web request.
For more in-depth documentation and news, check the Wiki:
https://github.com/BraveSirRobin/amqphp/wiki
Getting Started.
----------------
The easiest way to get started with Amqphp is to download one of the
tagged releases, these contain all of the source code and pre-built
"packages" in the build/ directory. Have a play round with the demo
scripts in the demo/ folder, you'll probably have to change some of
the values to point the scripts at your RabbitMQ install, this should
be easy enough. If you run the demo-producer.php script this will
publish a number of messages, then run the demo-consumer.php script to
read those test messages back again.
Source Packages
---------------
Because of the way the Amqp protocol is defined, we use a code
generation approach with Amqphp. This means that, for example, when
the RabbitMQ people introduce a new feature, you only have to
regenerate the Amqp "protocol bindings" and you're ready to use the
new feature (well, this isn't true in *all* cases, but most of the
simple ones anyway!). As a result of this, Amqphp uses a Phing build
system that outputs the source code library (i.e. the classes in the
src/ directory) together with the protocol bindings in 2 different
"flavours":
* nspf - classes are packages according to their namespace
* cfp - classes are packaged one per file.
In most cases you'll want to use the nspf package, simply because
there's fewer include files. The idea behind the cpf package is that
this version can be used with a class loader, for example if you want
to autoload the Amqphp packages. There is no functional difference
between the 2 packages, they are produced from the same set of source
files. For more info on how to use each kind of package, check the
class-loader.php file in the demos/ directory.
To build the packages yourself you'll need to install phing first,
then simply `cd` in to the Amqphp base dir and type `phing`. Note
that this hasn't been test on Windows and probably won't work there, I
don't have a copy of Windows to test on, so if you're able to help out
by fixing this I'd be very grateful!
brave-sir-robin/amqphp 适用场景与选型建议
brave-sir-robin/amqphp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 32.77k 次下载、GitHub Stars 达 79, 最近一次更新时间为 2013 年 01 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rabbitmq」 「AMQP」 「AMQPHP」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 brave-sir-robin/amqphp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 brave-sir-robin/amqphp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 brave-sir-robin/amqphp 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Queue
Work with RabbitMQ in Laravel.
Microservice RPC through message queues.
PHP AMQP Binding Library
The Listener component of the RabbitEvents library.
The Publisher component of the RabbitEvents package.
统计信息
- 总下载量: 32.77k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 79
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL
- 更新时间: 2013-01-09