GoogleCloudPlatform / node-red-contrib-google-cloud

Node-RED nodes for Google Cloud Platform
Apache License 2.0
90 stars 57 forks source link

Race condition in PubSub out when instance newly created #21

Closed kolban-google closed 5 years ago

kolban-google commented 5 years ago

Imagine we have a flow which contains a PubSub out node. The implementation of this node calls GCP to get the Topic which is then used to send messages. However, there is the possibility that the node will have received requests to publish messages BEFORE the PubSub node is ready.

kolban-google commented 5 years ago

We have implemented a simple queueing system. What this means is that when a request to publish a message is received before PubSub is ready, we will queue the message and then when PubSub does become ready, then we will publish it.