kainxspirits / laravel-pubsub-queue by kainxspirits

Queue driver for Google Cloud Pub/Sub.
204,604
40
3
Package Data
Maintainer Username: kainxspirits
Maintainer Contact: kainxspirits@users.noreply.github.com (Kendryck)
Package Create Date: 2018-05-01
Package Last Update: 2024-03-03
Language: PHP
License: MIT
Last Refreshed: 2024-03-25 03:05:30
Package Statistics
Total Downloads: 204,604
Monthly Downloads: 5,789
Daily Downloads: 64
Total Stars: 40
Total Watchers: 3
Total Forks: 32
Total Open Issues: 7

Laravel PubSub Queue

Travis StyleCI

This package is a Laravel 5.7 queue driver that use the Google PubSub service.

Installation

You can easily install this package with Composer by running this command :

composer require kainxspirits/laravel-pubsub-queue

If you disabled package discovery, you can still manually register this package by adding the following line to the providers of your config/app.php file :

Kainxspirits\PubSubQueue\PubSubQueueServiceProvider::class,

Configuration

Add a pubsub connection to your config/queue.php file. From there, you can use any configuration values from the original pubsub client. Just make sure to use snake_case for the keys name.

You can check Google Cloud PubSub client for more details about the different options.

'pubsub' => [
    'driver' => 'pubsub',
    'queue' => env('PUBSUB_QUEUE', 'default'),
    'project_id' => env('PUBSUB_PROJECT_ID', 'your-project-id'),
    'retries' => 3,
    'request_timeout' => 60,
    'subscriber' => 'subscriber-name',
],

Testing

You can run the tests with :

vendor/bin/phpunit

License

This project is licensed under the terms of the MIT license. See License File for more information.