softonic/laravel-queue-job 问题修复 & 功能扩展

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

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

softonic/laravel-queue-job

最新稳定版本:2.0.0

Composer 安装命令:

composer require softonic/laravel-queue-job

包简介

Custom Job implementation for vyuldashev@laravel-queue-rabbitmq library

README 文档

README

Latest Version Software License Build Status Total Downloads Average time to resolve an issue Percentage of issues still open

Custom Job implementation for vyuldashev/laravel-queue-rabbitmq library

⚠️ This library works on vyuldashev/laravel-queue-rabbitmq. If you have questions about how to configure connections, feel free to read the vyuldashev/laravel-queue-rabbitmq documentation.

Main features

  • Add support to have multiple Handlers for the same Routing key.
  • Assign your Routing keys with your Handlers in the queue config file.

Installation

You can require the last version of the package using composer

composer require softonic/laravel-queue-job

Usage

Replace your RabbitMQJob class in the queue config file.

'connections' => [
    // ...

    'rabbitmq' => [
        // ...

        'options' => [
            'queue' => [
                // ...

                'job' => \Softonic\LaravelQueueJob\RabbitMQJob::class,
            ],
        ],
    ],

    // ...    
],

Add your message_handlers mapping in queue config file:

'message_handlers' => [
        TestHandler::class => [ // Handler
            '#.test_v1.created.testevent', // Routing keys
            '#.test_v1.replaced.testevent',
            '#.test_v1.updated.testevent',
            'global.test_v1.updated.testevent',
            // ...
        ],
        AnotherTestHandler::class => [
            '#.test_v1.created.testevent',
            'global.test_v1.updated.testevent',
            // ...
        ],
        // ...
    ],

Testing with artisan

Your php artisan queue:work {connection-name} --queue={queue-name}

Testing

softonic/laravel-queue-job has a PHPUnit test suite, and a coding style compliance test suite using PHP CS Fixer.

To run the tests, run the following command from the project folder.

$ docker compose run test

To open a terminal in the dev environment:

$ docker compose run --entrypoint=bash php

License

The Apache 2.0 license. Please see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2021-12-10