定制 talentrydev/message-broker-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

talentrydev/message-broker-bundle

Composer 安装命令:

composer require talentrydev/message-broker-bundle

包简介

Symfony bundle integrating talentrydev/message-broker library

README 文档

README

This is a Symfony bundle used for integrating talentrydev/message-broker library into a Symfony project.

Installing

  • Run:
composer require talentrydev/message-broker-bundle
  • Add the MessageBrokerBundle to your kernel's registerBundles method:
return [
    //...
    new \Talentry\MessageBrokerBundle\MessageBrokerBundle();
];

Configuring

Bundle exposes the following configuration:

OptionTypeDefault valueAvailable valuesRequiredDescription
aws_regionstringeu-central-1Any valid AWS regiononly when using sns or sqs implementationAWS region
channelsarray-See belownoUsed for configuring channels and serialization strategies
kafkaarray-See belownoUsed for configuring Kafka
namespacestring-Any stringnoUsed for prefixing SQS queue names
publisher_implementationstringsqssqs,sns,array,kafkayesSelects the message broker implementation used for publishing messages
sns_endpointstring-Any valid URLnoAllows using a custom AWS SNS implementation (eg. localstack); useful for testing
sns_topic_arnstring-Any valid AWS SNS ARNonly when using sns publisher implementationARN of the SNS topic to which messages will be published
sqs_endpointstring-Any valid URLnoAllows using a custom AWS SQS implementation (eg. localstack); useful for testing
subscriber_implementationstringsqssqs,array,kafkayesSelects the message broker implementation used for receiving messages

Channels configuration:

OptionTypeDefault valueAvailable valuesRequiredDescription
namestring-Any valid channel nameyesName of the channel
serialization_strategystring-Valid serialization strategy class nameyesFQCN of the class implementing MessageSerializationStrategy

Kafka configuration:

OptionTypeDefault valueAvailable valuesRequiredDescription
auto_offset_resetstringearliestlatest, earliest, noneonly when using kafka implementationhttps://kafka.apache.org/documentation/#consumerconfigs_auto.offset.reset
broker_liststring-Valid list of host namesonly when using kafka implementationhttps://arnaud.le-blanc.net/php-rdkafka-doc/phpdoc/rdkafka.addbrokers.html
enable_partition_eofstringtruetrue or falseonly when using kafka implementationhttps://docs.confluent.io/3.2.1/clients/librdkafka/CONFIGURATION_8md.html
enable_auto_commitstringfalsetrue or falseonly when using kafka implementationhttps://kafka.apache.org/documentation/#consumerconfigs_enable.auto.commit
loglevel | integer | 3 | Any LOG* PHP constantonly when using kafka implementationSets the log level of the Kafka PHP module
max_poll_interval_msinteger300000Any integeronly when using kafka implementationhttps://kafka.apache.org/documentation/#consumerconfigs_max.poll.interval.ms
session_timeout_msinteger45000Any integeronly when using kafka implementationhttps://kafka.apache.org/documentation/#connectconfigs_session.timeout.ms

Important considerations when using kafka implementation

  • In order to use the kafka implementation, you need to install the php-rdkafka extension: https://arnaud.le-blanc.net/php-rdkafka-doc/phpdoc/index.html
  • There is no support for dead letter queues
  • Horizontal scaling of the consumers is rather limited: the number of consumers cannot exceed the number of partitions on the given topic
  • If the processing of the message takes longer than the max.poll.interval.ms, the consumer will be kicked out of the group and won't receive any more messages

talentrydev/message-broker-bundle 适用场景与选型建议

talentrydev/message-broker-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.07k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 11 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 talentrydev/message-broker-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 talentrydev/message-broker-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 talentrydev/message-broker-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-11-29