PHP code example of digitalmanagerguru / laravel-pubsub-queue
1. Go to this page and download the library: Download digitalmanagerguru/laravel-pubsub-queue library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitalmanagerguru / laravel-pubsub-queue example snippets
Digitalmanagerguru\PubSubQueue\PubSubQueueServiceProvider::class,
'pubsub' => [
'driver' => 'pubsub',
'queue' => env('PUBSUB_QUEUE', 'default'),
'queue_prefix' => env('PUBSUB_QUEUE_PREFIX', ''),
'project_id' => env('PUBSUB_PROJECT_ID', 'your-project-id'),
'keyFilePath' => env('PUBSUB_KEY_FILE'), // path to the service-account JSON (optional; ADC used if omitted)
'retrySettings' => [
'maxRetries' => 3,
],
'request_timeout' => env('PUBSUB_REQUEST_TIMEOUT', 60),
'subscriber' => env('PUBSUB_SUBSCRIBER', 'subscriber-name'),
'create_topics' => env('PUBSUB_CREATE_TOPICS', true),
'create_subscriptions' => env('PUBSUB_CREATE_SUBSCRIPTIONS', true),
'return_immediately' => env('PUBSUB_RETURN_IMMEDIATELY', false),
'max_messages' => env('PUBSUB_MAX_MESSAGES', 1),
],