承接 driade/queuebeam-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

driade/queuebeam-laravel

Composer 安装命令:

composer require driade/queuebeam-laravel

包简介

Laravel SDK for Queuebeam durable outbound operations.

README 文档

README

The official Laravel SDK for sending durable HTTP calls, webhooks, callbacks, email and Slack operations through Queuebeam.

Requirements

  • PHP 8.2 or newer
  • Laravel 11, 12 or 13

Installation

composer require driade/queuebeam-laravel
php artisan vendor:publish --tag=queuebeam-config
QUEUEBEAM_URL=https://api.queuebeam.cloud
QUEUEBEAM_API_KEY=qb_live_your_key
QUEUEBEAM_THROWS=true
QUEUEBEAM_TIMEOUT_MS=3000
QUEUEBEAM_ATTEMPTS=3

Laravel discovers QueuebeamServiceProvider and the Queuebeam facade automatically.

Usage

use Driade\Queuebeam\Facades\Queuebeam;

$result = Queuebeam::http()
    ->post('https://example.com/orders', ['order_id' => 8472])
    ->metas(['order_id' => 8472])
    ->idempotencyKey('order-8472')
    ->dispatch();

$result = Queuebeam::email()
    ->to('customer@example.com')
    ->cc('audit@example.com')
    ->subject('Order sent')
    ->html('<p>Your order is on its way.</p>')
    ->dispatch(throws: false);

$result = Queuebeam::slack()
    ->destination('operations')
    ->message('Order blocked')
    ->dispatch();

Every builder supports scheduling, delays, retries, idempotency and metadata. DispatchResult exposes the acceptance state, operation ID, HTTP error information and quota headers returned by Queuebeam.

Configuration

Per-call dispatch(throws: false) overrides the global QUEUEBEAM_THROWS setting. Programming errors such as invalid PHP types are never swallowed.

QUEUEBEAM_TIMEOUT_MS is the total timeout for each request from your Laravel application to Queuebeam, expressed in milliseconds. QUEUEBEAM_ATTEMPTS is the maximum number of calls, including the initial call; its default of 3 therefore means one initial call and up to two retries.

The SDK retries connection errors, timeouts, HTTP 408, 425, 429 and 5xx responses. Authentication, quota and validation failures are returned immediately. Every dispatch without an explicit idempotency key receives a generated key that remains stable across its attempts, preventing a lost 202 response from creating duplicate operations.

The published configuration can also be edited directly:

return [
    'base_url' => env('QUEUEBEAM_URL', 'https://api.queuebeam.cloud'),
    'api_key' => env('QUEUEBEAM_API_KEY'),
    'throws' => env('QUEUEBEAM_THROWS', true),
    'timeout_ms' => (int) env('QUEUEBEAM_TIMEOUT_MS', 3000),
    'attempts' => (int) env('QUEUEBEAM_ATTEMPTS', 3),
];

Runtime configuration is also supported:

Queuebeam::configure(timeout_ms: 5000, attempts: 5);

Testing

bash format.sh
composer analyse
composer test

License

Queuebeam for Laravel is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固