jadamavecool/laravel-azure-servicebus
Composer 安装命令:
composer require jadamavecool/laravel-azure-servicebus
包简介
Extending the Laravel queue to support the Microsoft Azure Service Bus Queues & topics for php 7.4
关键字:
README 文档
README
Overview
The library provides support for both Service Bus queues and topic based messaging (topics haven't been tested yet but should work). Default is Service Bus queues, for topic based messaging UseTopic should be set to true. The package should be auto discovered on Laravel > 5.6
Installation
Require this package in your composer.json:
"Jadamavecool-software/laravel-azure-servicebus": "<<version>>"
Run composer update!
After composer update is finished you need to add ServiceProvider to your providers array in app/config/app.php (this is only needed for laravel < 5.6):
'Jadamavecool\LaravelAzureServicebusTopic\Support\Serviceprovider',
add the following to the connection array in app/config/queue.php, and fill out your own connection data from the Azure Management portal:
'azureservicebus' => array(
'driver' => 'azureservicebus',
'endpoint' => 'https://*.servicebus.windows.net',
'SharedAccessKeyName' => '',
'SharedAccessKey' => 'primary key',
'queue' => '<topic name>',
'UseTopic' => true/false (default false)
)
Usage
The library provides support for both Service Bus queues and topic based messaging. Default is Service Bus queues, for topic based messaging UseTopic should be set to true. Once you completed the configuration you can use Laravel Queue API. If you do not know how to use Queue API, please refer to the official Laravel documentation.
From laravel Queue documentation, something like this should work:
$payload = new \stdClass(); $payload->id = 1; $payload->name = 'hello world'; ProcessPodcast::dispatch($payload)->onConnection('azureservicebus')->onQueue('queue-name');
artisan worker should be started as per Laravel's official documentation:
php artisan queue:listen azureservicebus --queue=queue-name
Azure Topic Support
There is no support (yet) of automatically creating subscriptions on the Azure Topic. A known subscription identifier is instead used for the subscription and needs to be created manually on the service bus. The identifier is 6c7dd8f3e3e145a5b9782b41d741c951
Version compatiblity
The package uses semantic versioning and tries to match Laravel versions.
- Use version 2.x if you are on Laravel 5.5
- Use version 5.x if you are on Laravel 5.6-5.8
- 6.x if you are on Laravel 6.x
- 7.x if you are on Laravel 7.x
- dev-master if you are on Laravel 8.x (see compat notes below)
Laravel 8x Support
[-Warning-] This package relies on Windows-Azure SDK for PHP which has been abandoned and hasn't had an upgrade in last 2 years. This has resulted in incompatible dependencies (especiailly with GuzzleHttp - see #2). We've decided to fork the windows-azure package and just keep pieces of Service Bus. Since the fork is still not published (there are still few unit tests that fail and have to be verified if they fail due to invalid test cases or due to broken functionality), the only way to include this package for Laravel 8.x is by usng dev-master. composer.json
"repositories": [{ "type": "git", "url": "https://github.com/sn123/azure-sdk-for-php.git" }], "require: { ... "Jadamavecool-software/laravel-azure-servicebus": "dev-master" },
Rest everything should work the same as older laravels.
jadamavecool/laravel-azure-servicebus 适用场景与选型建议
jadamavecool/laravel-azure-servicebus 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 10 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「azure」 「laravel」 「queues」 「servicebus」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jadamavecool/laravel-azure-servicebus 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jadamavecool/laravel-azure-servicebus 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jadamavecool/laravel-azure-servicebus 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Small library to access Microsoft Windows Azure Blob Storage with a Service or a StreamWrapper.
Extending the Laravel queue to support the Microsoft Azure Service Bus Queues & topics.
This composer package provides a Laravel queue ensurer.
Adds Silverstripe Flysystem support for using the Azure Blob adapter
Laravel 5 Queue Driver for Microsoft Azure Storage Queue
An elegant wrapper around the famous php-amqplib for 90% use case.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-19