0

I am using an eventarc trigger to send messages to my cloud run instances. However, the issue is that I am unable to set an ACK deadline since there is no way to set any attributes. I have also tried to use just purely Pubsub however, I am unable to get the endpoint URL since it is only retrievable after it is created. I want to avoid having to split this into two different modules since it adds additional complexity, but I am unsure what else to do at this point.

Any help would be greatly appreciated!

Sciii
  • 3
  • 1
  • You can't for now. Why your Cloud Run take so much time to process an event? – guillaume blaquiere May 30 '22 at 18:59
  • The main issue is that when my cloud run is cold started, it will end up spawning multiple instances running the same job. Since these are data import jobs that can be very large which can hit the database hard. The processing time for an event is typically around 1-20s, however, there are some very large jobs too that take around 11 minutes. – Sciii May 31 '22 at 03:19

1 Answers1

2

Eventarc is backed on PubSub, and the max timeout of PubSub is 10 minutes. Therefore, even if the timeout was customizable on Eventarc, it wouldn't match your requirements.

You have several solutions

  • You can invoke a Cloud Run/Functions to create a Cloud Task, and the task call your Cloud Run (async) to perform the process in Background
  • You can invoke a Cloud Workflow that your Cloud Run (async) to perform the process in Background
  • You can invoke a Cloud Run/Functions that invoke the brand new Cloud Run job (with your processing code) to perform the process in Background
guillaume blaquiere
  • 66,369
  • 2
  • 47
  • 76