thecubicle / laravel-queue-gc-pub-sub
Laravel queue driver for Google Cloud PubSub
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- google/cloud: ^0.20.0
- illuminate/queue: ^5.2
- illuminate/support: ^5.2
Requires (Dev)
- phpunit/phpunit: ^5.7
- vlucas/phpdotenv: ^2.4
This package is not auto-updated.
Last update: 2022-02-14 01:15:51 UTC
README
Google Cloud PubSub for Laravel queues.
Installation
-
Install using composer:
composer require thecubicle/laravel-queue-gc-pub-sub
-
Add GCPubSubServiceProvider to
providers
array inconfig/app.php
:thecubicle\GCPubSub\GCPubSubServiceProvider::class,
-
Create the necessary subscriptions and topics in PubSub using the Google CLI or web frontend. Configure subscription and topics to the configuration below.
Configuration
-
Add the keys below to
.env
and replace with the proper values:GC_PROJECT_ID=project-id GC_AUTH_JSON=path-to-creds-file GC_PUBSUB_TOPIC=topic-to-use-as-queue GC_PUBSUB_SUBSCRIPTION=subscription-name
Queues / Topics
This component uses PubSub topics for queues.
Using the PubSub emulator
To use the PubSub emulator add the key / value pair: PUBSUB_EMULATOR_HOST=http://localhost:{port}
to .env
. Replace {port} with the port the PubSub emulator is running on.
Notes
Tested with Laravel 5.2