GoogleCloudPlatform/node-red-contrib-google-cloud

Race condition in PubSub out when instance newly created

Closed this issue · 1 comments

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.

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.