Scaling Heterogeneous Cluster With Deployment Aware Job Executor

Hi @run, like @Ingo_Richtsmeier said the usage of tenant ids is not specially required based on your described use case.

You have already activated the “jobExecutorDeploymentAware” option, this alone is responsible for the binding of the running Job executor instance to only registered processes see docs about job-execution-in-heterogeneous-clusters

If you say that the incorrect node is still picking up jobs from the other node then it could be related to how the transactions in the process if any are setup exist. Which engine/application is responsible for starting the execution thread?

Another issue could be related to using the SpringAutoDeployment feature in multiple applications with a shared Database. The default logic for SpringAutoDeployment deploys the processes using the deployment name “SpringAutoDeployment”. After a restart of the Applications only the last deployment with this name will be restarted meaning the jobs could potentially be retrieved by the wrong engine.

      Map<String, ResourceEntity> existingResources = commandContext
      .getResourceManager()
      .findLatestResourcesByDeploymentName(
          candidateDeployment.getName(),
          candidateResources.keySet(),
          source,
          candidateDeployment.getTenantId());

Using the EnableProcessApplication annotation on your Application class can help solve this issue as the deployment name can be easily defined.

@EnableProcessApplication("APP2-ProcessApp")

Its difficult to say with certainty why your having issues without more detailed information about your setup and processes but maybe these ideas help.