olaurendeau/rabbit-mq-admin-toolkit-bundle
Composer 安装命令:
composer require olaurendeau/rabbit-mq-admin-toolkit-bundle
包简介
Automate rabbitmq vhost's configuration creation / update
README 文档
README
Automate rabbitmq vhost's configuration creation / update
Installation
composer require olaurendeau/rabbit-mq-admin-toolkit-bundle
Add RabbitMqAdminToolkitBundle to your bundles
// config/bundles.php <?php return [ ... Ola\RabbitMqAdminToolkitBundle\OlaRabbitMqAdminToolkitBundle::class => ['all' => true] ... ];
Update your configuration
# config/packages/ola_rabbit_mq_admin_toolkit.yaml ola_rabbit_mq_admin_toolkit: delete_allowed: true # Allow deletion of exchange, queues and binding for updating configuration. Shouldn't be enabled in production connections: default: http://user:password@localhost:15672 vhosts: default: name: /my_vhost permissions: user: ~ exchanges: exchange.a: ~ queues: queue.a: bindings: - { exchange: exchange.a, routing_key: "a.#" } - { exchange: exchange.a, routing_key: "b.#" }
Usage
Simply run app/console rabbitmq:vhost:define.
Configuration sample
See app/console config:dump-reference OlaRabbitMqAdminToolkitBundle for full configuration possibilities
# config/packages/ola_rabbit_mq_admin_toolkit.yaml ola_rabbit_mq_admin_toolkit: delete_allowed: true # Allow deletion of exchange, queues and binding for updating configuration. Shouldn't be enabled in production default_vhost: test # default is "default" silent_failure: true # Catch all exceptions in commands. Could be use in test environment if no rabbitmq available connections: default: http://user:password@localhost:15672 vm: http://user:password@192.168.1.1:15672 vhosts: test: name: /test connection: vm # default is "default" permissions: user: ~ exchanges: exchange.a: durable: false # default is "true" exchange.b: type: direct # default is "topic" exchange.c: ~ queues: queue.a: durable: false # default is "true" arguments: # define arguments x-message-ttl: 5000 bindings: - { exchange: exchange.a, routing_key: "a.#" } - { exchange: exchange.b, routing_key: "b.#" } queue.b: bindings: - { exchange: exchange.a, routing_key: "a.#" } - { exchange: exchange.b, routing_key: "b.#" } - { exchange: exchange.c, routing_key: "c.#" } queue.c: bindings: - { exchange: exchange.a, routing_key: "a.#" } - { exchange: exchange.c, routing_key: "c.#" }
Sharding queues
Sharding queues can be useful to process huge amount of messages.
# config/packages/ola_rabbit_mq_admin_toolkit.yaml ola_rabbit_mq_admin_toolkit: delete_allowed: true # Allow deletion of exchange, queues and binding for updating configuration. Shouldn't be enabled in production connections: default: http://user:password@localhost:15672 vhosts: default: name: /my_vhost permissions: user: ~ exchanges: exchange.a: ~ queues: queue.a.sharded: name: "queue.a.{modulus}" modulus: 5 bindings: - { exchange: exchange.a, routing_key: "a.{modulus}.#" } - { exchange: exchange.a, routing_key: "b.#" }
It will produce the following configuration :
olaurendeau/rabbit-mq-admin-toolkit-bundle 适用场景与选型建议
olaurendeau/rabbit-mq-admin-toolkit-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 94.67k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 01 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 olaurendeau/rabbit-mq-admin-toolkit-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 olaurendeau/rabbit-mq-admin-toolkit-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 94.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-31

