External worker question

Hi… I hope to understand some concept for camunda external worker.

My understanding is that 1) external worker is to run outside of the Camunda Engine to take on certain tasks. I sense the benefits are the following:

  1. keep engine from affected by the worker
  2. Worker can scale without affecting engine(?)

If so, my question is

  1. When to use external worker vs in-proc activity?
  2. What is the recommendated way to build external worker? Spring boot or plain Java ?
  3. Can worker scale to multiple instances assuming camunda has the proper locking mechanism to task, and workers is stateless?
  4. I see external worker used long pull to keep the http connection. At one point of time, the connection will close or fail. What is the recommended way to handle this scenario?

Thanks,

For long running jobs, and to achieve scaling of job processors(workers)

It depends on your need. Although, there are various external task clients (SPRINGBOOT, JAVA, JAVASCRIPT, PYTHON, etc) were implemented.

Yes. Camunda has locking mechanism on the jobs.

If connection is closed/failed, the lock on the job will be released after lapsing locktime and it will be available for next processor to process the job.

1 Like

Thanks for the help.