Control JobExecutor to grab the task from the right version of process definition

Hi,
I need some help here.

We have Java containers that run the embedded Camunda process engine. We need to run multiple versions of our java container and multiple replica for each version. We have the following use cases:

  1. process definition changed in the new version of application
  2. process definition remains the same but JAVA delegate implementation changed in the new version

We would like to have a clean separation in both use cases so that java containers only consume the jobs created by the process submitted by the same version of java containers. I think I can solve the problem by make the engine configured with deployment-aware=true, but I need to find a way to configure the engine to use the same deployment id for the same version of the application replicas.

We are using spring boot starter, what is the best way to customize the deployment id?

Thanks,

Ling