承接 asmblah/php-amqp-compat 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

asmblah/php-amqp-compat

最新稳定版本:v0.4.13

Composer 安装命令:

composer create-project asmblah/php-amqp-compat

包简介

README 文档

README

Build Status

php-amqp/ext-amqp compatibility using php-amqplib.

Why?

php-amqp/librabbitmq does not fully support AMQP heartbeats, they are only supported during blocking calls into the extension.

Heartbeat sender

With php-amqplib, we're able to send heartbeats more regularly, in multiple ways:

  1. Using a ReactPHP EventLoop with Envoylope EventLoop (recommended).
  2. Using UNIX System V signals with Envoylope ext-pcntl.

See the usage instructions for the packages above for installation.

Usage

First, remove ext-amqp - it cannot be used at the same time as this compatibility layer. Usually, this will be with PECL:

$ pecl uninstall amqp

This is because the classes installed in the global/root namespace such as AMQPConnection would conflict.

Second, install this package with Composer:

$ composer require asmblah/php-amqp-compat

Lastly, install the relevant heartbeat sender, if required.

That should be all the changes required - this userland library is designed as a drop-in replacement.

Limitations

  • Persistent connections are not and cannot be supported from userland.
  • If existing logic is checking for the amqp extension via extension_loaded('amqp'), it will fail because this library does not define an extension. During functional testing, extension_loaded(...) is hooked using PHP Code Shift to allow running tests from the reference implementation php-amqp/ext-amqp, see ReferenceImplementationTest.

See also

  • The original php-amqp extension that this compatibility layer replaces: php-amqp/ext-amqp.
  • php-amqplib, which this library uses under the hood: php-amqplib.

统计信息

  • 总下载量: 8.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-25