coka/semaphore-messenger
Composer 安装命令:
composer require coka/semaphore-messenger
包简介
The Semaphore Transport allows you to send and receive messages on System V message queues.
README 文档
README
The Semaphore Transport allows you to send and receive messages on System V message queues. The semaphore transport configuration looks like this :
# .env MESSENGER_TRANSPORT_DSN=semaphore://%kernel.project_dir%/.env # Full DSN Example MESSENGER_TRANSPORT_DSN=semaphore://%kernel.project_dir%/.env?project=M&message_type=1&message_max_size=1024
A number of options can be configured via the DSN or via the options key under the transport in messenger.yaml:
| Option | Description | Default |
|---|---|---|
| path | Pathname to create System V IPC key | |
| project | Project identifier to create System V IPC key | M |
| message_type | The type of message to send | 1 |
| message_max_size | The maximum size in bytes of a message if the message is larger than this size, an exception will be thrown | 131072 |
| auto_setup | Enable or not the auto-setup of queue | true |
This extension is not available on Windows platforms.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require coka/semaphore-messenger
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Configuration
You can register the semaphore transport factory to be able to use it via a DSN in the Symfony application.
Register the Semaphore Transport Factory
# config/services.yaml services: Oka\Messenger\Transport\Semaphore\SemaphoreTransportFactory: tags: [messenger.transport_factory]
Use your Transport
Within the framework.messenger.transports.* configuration, create your named transport using your own DSN:
# config/packages/messenger.yaml framework: messenger: transports: yours: 'semaphore://...'
Copyright and License
The coka/semaphore-messenger library is copyright © Baidai Cedrick Oka https://github.com/CedrickOka and licensed for use under the MIT License (MIT). Please see LICENSE for more information.
coka/semaphore-messenger 适用场景与选型建议
coka/semaphore-messenger 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 65 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 04 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 coka/semaphore-messenger 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 coka/semaphore-messenger 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 65
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-23