invia-de/stomp-php
Composer 安装命令:
composer require invia-de/stomp-php
包简介
stomp support for PHP
README 文档
README
This project is a PHP Stomp Client that besides it implements the Stomp protocol fully, brings some ActiveMQ and Apollo specific utils that could make your messaging from PHP easier.
Credits
This library was initially developed by Dejan Bosanac. We would like to thank you for your work and we're happy to continue it.
Version choice
- For new projects you should use version
4.*which requiresphp-5.6. Support forphp-5.6ends with version5.*. - For projects running older php versions you can use version
4.2.*forphp-5.5and3.*forphp-5.3, please consider to update php. - For running projects with
fusesource/stomp-php@2.xclients you can use version2.2.2. - All version newer that
2.xwon't be compatible withfusesource/stomp-php. (https://github.com/dejanb/stomp-php.)
Installing
composer require stomp-php/stomp-php
Examples
You find different usage tutorials in our example project https://github.com/stomp-php/stomp-php-examples.
Connection Probing
It's hard to find out if a socket connection is still working or not, Stomp allows us to use heartbeats to test if client and server are ready to serve messages.
You should use \Stomp\Network\Observer\ServerAliveObserver or \Stomp\Network\Observer\HeartbeatEmitter to receive or
send heartbeats. Doing so will ensure that your client will detect a broken connection in time. Please have a look at
https://github.com/stomp-php/stomp-php-examples for some example code with additonal comments.
Replace fusesource/stomp-php
If you used fusesource/stomp-php before, you can use our 2.x versions.
"require": { "stomp-php/stomp-php": "2.*" }
Contributing
We code in PSR2, please use our predefined pre_commit.sh hook.
Tests
To run the tests you first need to fetch the dependencies for the test suite via composer:
$ php composer.phar install
The functional testsuite is divided into three broker versions.
Currently it's running on ActiveMq (Port 61010), Apollo (61020), RabbitMq (61030), Artemis (61040).
Apollo should be configured to use admin:password and RabbitMq to guest:guest.
While ActiveMq must be configured to use no login at all.
You can setup all brokers by running travisci/bin/start.sh. Stop them by travisci/bin/stop.sh. (Docker is required.)
If you only like to run the functional generic tests, ensure Apollo is configured.
A basic setup can be achieved by running ./travisci/bin/apollo-mq.sh 1.7.1.
(If you want to create a local running broker, you find the config / setup at travisci/docker/apollo-mq/)
Licence
invia-de/stomp-php 适用场景与选型建议
invia-de/stomp-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.95k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 01 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rabbitmq」 「messaging」 「stomp」 「jms」 「activeMQ」 「apollomq」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 invia-de/stomp-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 invia-de/stomp-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 invia-de/stomp-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
STOMP bindings for React.
Work with RabbitMQ in Laravel.
Microservice RPC through message queues.
PHP AMQP Binding Library
Laravel Stomp driver
Message Queue Stomp Transport
统计信息
- 总下载量: 16.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-01-06