Hi there,
I would like to use pubsub to trigger in a push subscription a Run Job. This works without issues, through a http endpoint like this:
https://us-central1-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/[projectid]/jobs/[jobna...
I have not found a way how to access the pubsub message from inside the job. Do I miss something?
As a workaround I found:
I would prefer to use a push pubsub subscription with a http endpoint for a job and access inside the job the message most. But I do not find an api for this. So I fall back for option 2.
Is this the best way to go or is there a way to retrieve the message inside a job I do not see in my setup?
Solved! Go to Solution.
Hi Marc223, We have a private preview going on where you can get the content of the message in an environment variable in your container. Does that solution work for you? If yes, you can sign up here to try the private preview: https://docs.google.com/forms/d/e/1FAIpQLSd1pHHel6MVWV5FQI0nDQ97vuLcMzFYHximT6TTJlctQKFBhw/viewform
Hi @Marc223,
Welcome to the Google Cloud community!
Pub/Sub with Cloud Run is a good starting point to access Pub/Sub messages inside a Cloud Run job triggered by a Pub/Sub push subscription.
Here are the workarounds based on Google Cloud Documentation:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hi Marc223, We have a private preview going on where you can get the content of the message in an environment variable in your container. Does that solution work for you? If yes, you can sign up here to try the private preview: https://docs.google.com/forms/d/e/1FAIpQLSd1pHHel6MVWV5FQI0nDQ97vuLcMzFYHximT6TTJlctQKFBhw/viewform
Hi Chieko and Knet,
Currently I have pubsub with push http subscripiton -> cloud function -> run job with args. Inside the job I get the args and have access to the message.
Yes I am interested in the private preview, so I can get rid of my cloud function. I fill out the form.
Thanks!