By providing the Google Cloud project ID and a Pub/Sub topic subscription name you can listen to all incoming messages to that topic.
You need to have authentication setup with GCP with enough permissions to listen to the pub/sub topic you are trying to connect to. Please refer to the GCP getting started with authentication article to setup your authentication.
-
Create a new virtual environment running the following commands from the root of your project directory (Optional):
virtualenv env
-
Activate your new virtual environment (Optional):
-
Linux:
source env/bin/activate
-
Windows
env\scripts\activate
-
-
Install all the Python packages needed for this application:
pip install -r requirements.txt
-
Run the tool:
python main.py