Can I make google pubsub subscriptions push url a google cloud function trigger

2,212 views
Skip to first unread message

aman bhargava

unread,
Jul 25, 2018, 3:39:58 PM7/25/18
to Google Cloud Pub/Sub Discussions
Can I make google pubsub subscriptions push url a google cloud function trigger

Kenworth (Google Cloud Platform)

unread,
Jul 26, 2018, 2:16:07 PM7/26/18
to Google Cloud Pub/Sub Discussions
Per this doc, Cloud Function can be triggered by Cloud Pub/Sub events. See example or this for more information on Pub/Sub Triggers.

Joar Vatnaland

unread,
Jun 28, 2019, 1:06:09 PM6/28/19
to Google Cloud Pub/Sub Discussions
Yes, you set this up when you create the function.  Just choose pubsub as the trigger for the function and choose your topic.  That's all!

John Laham

unread,
Jul 24, 2019, 11:16:48 AM7/24/19
to Google Cloud Pub/Sub Discussions
So if you set up a Cloud Function to be triggered by PubSub then it is set up as a Background Function, and TIL that background functions have additional limitations on available quota. If you want to set up a Cloud Function as an HTTP endpoint to be triggered by a PubSub push subscription, you can do this but you would need to verify the URLs independently for each function.

This then begs the question, if I set up a Cloud Function to be an HTTP endpoint, its URL is namespaced by the region and project ID, and so why do I need to verify the domain/url for the function since it can only have that URL if it were created in this project? This forces manual intervention and stops you from being able to programmatically provision push subscriptions to Cloud Function HTTP endpoints making the overall process quite tedious.

Kir Titievsky

unread,
Jul 25, 2019, 11:03:39 AM7/25/19
to John Laham, Google Cloud Pub/Sub Discussions
Fair point, John. Sorry for the trouble.  We are working on a way to solve this in the next few months.  Thanks for your patience in the meantime.  

On Wed, Jul 24, 2019, 11:16 AM 'John Laham' via Google Cloud Pub/Sub Discussions <cloud-pubs...@googlegroups.com> wrote:
So if you set up a Cloud Function to be triggered by PubSub then it is set up as a Background Function, and TIL that background functions have additional limitations on available quota. If you want to set up a Cloud Function as an HTTP endpoint to be triggered by a PubSub push subscription, you can do this but you would need to verify the URLs independently for each function.

This then begs the question, if I set up a Cloud Function to be an HTTP endpoint, its URL is namespaced by the region and project ID, and so why do I need to verify the domain/url for the function since it can only have that URL if it were created in this project? This forces manual intervention and stops you from being able to programmatically provision push subscriptions to Cloud Function HTTP endpoints making the overall process quite tedious.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/10959a8c-7233-47ba-bd8d-a5bb9f685a8e%40googlegroups.com.

John Laham

unread,
Jul 25, 2019, 3:32:14 PM7/25/19
to Kir Titievsky, Google Cloud Pub/Sub Discussions
Thanks for the response and info Kir; is there a bug or ariane launch that we can follow to keep up to date with the status of this feature? I have a customer that may hit these limitations in the foreseeable future, and I want to make sure I can go back to them with a solution, if needed.

Thanks!

Reply all
Reply to author
Forward
0 new messages