I have a Cloud Function (v1) that is set to trigger every time a message is received in a specific topic. This part of the configuration is done correctly (since I've followed previous working cloud functions).
This is my cloud function:
const myCloudFunction = functions.pubsub
.topic("myTopic")
.onPublish(async (message) => {
// do something
});
I've had some problems with the topic configuration but now everything seems to be working (the service account have the permissions it should have to manage the messages and the topic is receiving and processing them properly).
Now it's where it gets a little confusing to me: as far as I understand, every time a message is published in a topic, the subscription need to publish this message to the service that it's consuming (in this case, cloud functions).
The subscription is also receiving the message but the CF is not being triggered. After some research, I've discovered that I need to change the delivery type from PULL (that requires an active trigger - which we don't want to) to PUSH. However, this PUSH configuration ask's me an Endpoint URL, and I didn't understand where should I get this not only from the working ones, but neither in the documentation. Should this be from the cloud function, the topic or somewhere else? How can I find it?