bnnvara/simple-bus-aws-bridge-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bnnvara/simple-bus-aws-bridge-bundle

Composer 安装命令:

composer require bnnvara/simple-bus-aws-bridge-bundle

包简介

Symfony bundle to enable AWS SNS/SQS integration into simplebus

README 文档

README

Code Coverage Build Status Scrutinizer Code Quality

By BNNVARA

README

Disclaimer

Be aware: asynchronous events cannot be consumed by the same service that publishes it. Doing so the event will be published to the asynchronous queue again, creating an infinite loop. It is possible to bypass this by creating two seperate events. One that is handled internally and one that is published to the eventbus.

Installation

Using Composer:

composer require bnnvara/simple-bus-aws-bridge-bundle

Enable the bundle in bundles.php

return [
        ...
        BNNVARA\SimpleBusAwsBridgeBundle\SimpleBusAwsBridgeBundle::class => ['all' => true],
        ...
];

Configuration

Below a complete overview of the configuration for this bundle

simple_bus_aws_bridge:
    credentials
        key: value
        secret: value
        token: value
        expires: value
        region: value
    topic:
        name: arn-of-topic
        credentials:
            key: value
            secret: value
            token: value
            expires: value
            region: value
        version: "1.0"
        asynchronous_events:
            - event1
            - event2
    queue:
        url: url-to-sqs-queue
        credentials:
            key: value
            secret: value
            token: value
            expires: value
            region: value
        version: "1.0"
        

The credentials at root level are required. These are the fallback credentials in case there are no specific credentials for `topicorqueue`. This means the credentials section for `topicandqueue` are optional and only needed if the credentials differ from the root level credentials.

Topic

The minimal topic configuration looks like this:

simple_bus_aws_bridge:
    credentials
        key: can-be-generated-or-found-in-iam-console-aws
        secret: can-be-generated-or-found-in-iam-console-aws
        region: region-in-which-your-credentials-are-valid
    topic:
        name: arn-of-topic
        version: "version-of-aws-sdk"
        asynchronous_events:
            - first-event-you-want-handled-async
            - second-event-you-want-handled-async
            - etc
            

Only events defined in the `asynchronous_events` section are handled asynchronous.

To configure simplebus to use this bridge add/modify the configuration to match this config:

simple_bus_asynchronous:
  events:
    strategy: 'predefined'
    publisher_service_id: BNNVARA\SimpleBusAwsBridge\Publisher\SnsPublisher

More information on how to configure simplebus please have a look at the documentation

Queue

This is the minimal consumer configuration:

simple_bus_aws_bridge:
    credentials
        key: can-be-generated-or-found-in-iam-console-aws
        secret: can-be-generated-or-found-in-iam-console-aws
        region: region-in-which-your-credentials-are-valid
    queue:
        url: 'url'
        version: '1.0'
        

The url of a queue usually looks like `https://sqs.REGION.amazonaws.com/123456789098/QUEUENAME```. The url value in the configuration should have the same value without the QUEUENAME.

Consume

Messages are consumed using a console command:

bnnvara:simplebus:consume <<QUEUENAME>>

Assuming the aws url of the queue is `https://sqs.REGION.amazonaws.com/123456789098/QUEUENAME```, the consume command look like this:

bin/console bnnvara:simplebus:consume QUEUENAME

bnnvara/simple-bus-aws-bridge-bundle 适用场景与选型建议

bnnvara/simple-bus-aws-bridge-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 37.29k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 bnnvara/simple-bus-aws-bridge-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-09