I am referring to https://developer.aliyun.com/mirror/npm/package/zeebe-node-next/v/2.4.0 - scroll down to the " Decoupled Job Completion pattern" section. It’s a good overview of what I am trying to implement using a C# client. Another good reference is https://blog.bernd-ruecker.com/orchestrating-azure-functions-using-bpmn-and-camunda-a-case-study-ff71264cfad6 where Bernd mentions separate Fetcher and Completer connectors (albeit for Camunda but the concept is exactly what I am looking to do with RabbitMQ or Async Azure function calls - and yes, I’ll maintain the job key for correlating it back). The Node client above has this nifty feature:
// Call forwarded() to release worker capacity
complete.forwarded()
I am interested in releasing worker capacity after triggering async operation (e.g. if MaxJobsActive is set to 1, I want this worker to fetch and process the next task). The jobs could be long-running (I have reviewed a long-running jobs topic on this forum already, seems that with a small-ish number of jobs memory consumption won’t be an issue). Back-pressure would be handled by RabbitMQ.
As it is right now, I can probably set the worker’s .Timeout(TimeSpan.FromDays(10)) - and hang out for 10 days waiting for completion. This, however, will count this long-running job against my MaxJobsActive count. And, depending on the size of workflow variable objects, (correct me if I am wrong - I haven’t reviewed C# client code) this would likely eat up the memory on the machine running the client, basically maintaining all the job details including variables in-memory. I would like to free up the resources on the machine running the client as soon as the job is dispatched externally (e.g. via RabbitMQ). There will be a separate process listening for task completion and signalling job completion to the broker.
What are the recommendations to implement the above in C# client and possibly not hog up the worker jobs allotment while awaiting job completion? Did I miss anything in C# client docs, or is this feature not available? I am using the latest version of everything (Zeebe 0.23.1)