Publisher Subscriber (Pub Sub) - ProVR-Norway/ProvrBackend GitHub Wiki
About
The bucket user-cad-models
is configured to publish details about new CAD models being uploaded to it to the topic user-cad-models
under Pub/Sub > Topics
on Google Cloud. This topic has a subscription named cad-microservice-subscription
that will send a POST request to the endpoint /cadmodels/pub-sub
with info about which model was uploaded/changed, at what time it happened, etc. In short, the bucket user-cad-models
is the publisher and the endpoint /cadmodels/pub-sub
the subscriber.
Setup
The following part of Google Cloud's documentation was used to create the topic and subscription mentioned above: Create Subscription / Topic
This link was used to configure Pub/Sub for Cloud Storage for the user-cad-models
bucket: Pub/Sub Cloud Storage Config