此包已被废弃,不再维护。未建议替代包。
此包的最新版本(v0.4.2)没有提供许可证信息。
v0.4.2
2014-09-08 21:34 UTC
Requires
- braincrafted/background-process: ~0.3
- braincrafted/json: ~0.2
- react/socket: ~0.3
Requires (Dev)
- mockery/mockery: 0.8.*
- phpunit/phpunit: 3.7.*
- symfony/dependency-injection: 2.3.*
README
PHP 实现的异步消息队列(主要用于娱乐和乐趣)。
由 Florian Eckerstorfer 提供。
安装
推荐通过 Composer 安装 BcMq
{ "require": { "braincrafted/mq": "dev-master" } }
使用
BcMq 需要两个不同的脚本,一个服务器和一个消费者。服务器需要持续运行,以便接受新的消息。每当有新消息到达时,服务器将在后台调用消费者并立即关闭连接。
可以使用包含的生产者或通过将 JSON 对象写入配置的端口来生产消息。
在 examples
目录中有服务器、消费者和生产者的示例。
变更日志
版本 0.4.2(2014 年 9 月 8 日)
- 更新了
react/socket
的版本字符串
版本 0.4.1(2014-05-19)
- 修复了
BackgroundProcess
的命名空间
版本 0.4(2013-11-15)
- 更改命名空间为
Braincrafted
版本 0.3(2013-07-05)
- 服务器在处理传入数据时可以发送回调
版本 0.2(2013-06-04)
- 将
symfony/dependency-injection
更新到版本 2.3
版本 0.1
- 首次发布
许可证
The MIT License (MIT)
Copyright (c) 2013 Florian Eckerstorfer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.