zoon/queue-interop
Composer 安装命令:
composer require zoon/queue-interop
包简介
Promoting the interoperability of MQs objects. Based on Java JMS, modernized with psalm typehints.
README 文档
README
About
queue-interop tries to identify and standardize a common way for PHP programs to create, send, receive and read MQ messages to achieve interoperability.
Through discussions and trials, we try to create a standard, made of common interfaces but also recommendations.
If PHP projects that provide queue implementations begin to adopt these common standards, then PHP applications and projects that use MQs can depend on the common interfaces instead of specific implementations. This facilitates a high-level of interoperability and flexibility that allows users to consume any MQ transport implementation that can be adapted to these interfaces.
The work done in this project is not officially endorsed by the PHP-FIG. We adhere to the spirit and ideals of PHP-FIG.
Installation
You can install this package through Composer:
# Install a Queue Interop compatible transport, for example
$ composer require enqueue/fs
Examples
Send a message:
<?php use Enqueue\Fs\FsConnectionFactory; $context = (new FsConnectionFactory())->createContext(); $context->createProducer()->send( $context->createQueue('aQueue'), $context->createMessage('aBody') );
Consume a message:
<?php use Enqueue\Fs\FsConnectionFactory; $context = (new FsConnectionFactory())->createContext(); $consumer = $context->createConsumer($context->createQueue('aQueue')); $timeout = 5000; // 5sec if ($message = $consumer->receive($timeout)) { // process the message. $consumer->acknowledge($message); }
Find out more here:
- Enqueue transport docs contains a lot how to use example.
- Formapro's Blog contains variety blog post about Queue Interop usage.
- RabbitMQ's official tutorials ported to AMQP Interop.
Compatible projects
Projects
- Enqueue
- Swarrot
- Bernard
- vladimir-yuldashev/laravel-queue-rabbitmq
- sonata-project/notification-bundle
- yiisoft/yii2-queue
- queue-interop/ext - Queue Interop as PHP extension. Useful for Phalcon developers.
Implementations
- enqueue/amqp-ext
- enqueue/amqp-lib
- enqueue/amqp-bunny
- makasim/rabbitmq-cli-consumer-client
- enqueue/pheanstalk
- enqueue/stomp
- Amazon SQS enqueue/sqs
- Amazon SNS enqueue/sns
- Amazon SNS\SQS enqueue/sns
- Google PubSub enqueue/gps
- enqueue/rdkafka
- enqueue/redis
- enqueue/mongodb
- enqueue/gearman
- enqueue/dbal
- enqueue/fs
- enqueue/null
- enqueue/wamp
- makasim/php-fpm-queue
- assoconnect/enqueue-azure
Amqp interop
There is AMQP interop built on top of Queue Interop. It is completly compatible with queue interop and only adds some AMQP specific features:
- Queue\Exchange declaration
- Queue\Exchange Binding.
- Basic consume support.
- and other AMQP specific features.
Compatible projects
Workflow
Everyone is welcome to join and contribute.
We try to not break BC by creating new interfaces instead of editing existing ones.
While we currently work on interfaces, we are open to anything that might help towards interoperability, may that be code, best practices, etc.
License
zoon/queue-interop 适用场景与选型建议
zoon/queue-interop 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.46k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 03 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「queue」 「messaging」 「jms」 「MQ」 「message queue」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zoon/queue-interop 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zoon/queue-interop 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zoon/queue-interop 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bridge between JMS Serializer Bundle and Superdesk Web Publisher.
PHP AMQP Binding Library
This bridge allows you to use jms payment plugins but in payum like way.
A Laravel package to monitor queue jobs.
MongoDB support for JMSPaymentCoreBundle
PHP SDK for Mobile Message SMS API
统计信息
- 总下载量: 4.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-13