PubSub Connector - can only PublishMessage?

Is there no way to read from a pubsub queue other than the PubSub Trigger?

We made a REST call to a function that reads from the queue and passes us the array payload and all works fine until you try and add security for PROD ready! seems we are missing some sort of scope for the service account..

Can you not just use the REST Task to read directly from PubSub?

BTW: We have recently added Read capability for the PubSub connector to our backlog as well, but calling the PubSub REST API should be possible as a workaround. Let me know if you are using the Function to do something extra that can’t be done directly via REST. (BTW: you could also do a while loop and pull messages one at a time via REST task in a loop until they are depleted).

Thanks Shaaland

We have sorted it now. It was adding the security to the function and then REST call that was an issue. The docs say to use a Google SA (which doesn’t work) but you need to create a new SA with relevant permissions, then add an Auth profile using the Google OIDC Token with an audience of the function being called.

1 Like