A simple example for testing GCP pub/sub service.
- create topic "hello_topic"
- create subscription to the topic, which named "sub_one"
- IAM -> create service account and add pub/sub access permission
- generate Token for the service account and download as "key.json" file
- put "key.json" in the folder with worker.php sender.php
- run command to install google client library "composer install"
- php worker.php
- php sender.php "message you want to send"