Isolation of jobs when using multiple ProcessEngines and one database

Hi @kdobb,

I was writing a long response (see below) and then remembered something helpful: In your configuration, you can set the job worker to be deployment aware. The property camunda.bpm.job-execution needs to be set to true. An engine does only pick up jobs for the deployments registered to the engine. This information is not persisted. Therefore, I recommend to (re-)deploy all processes for one engine at startup. You can read more about the Deployment-Aware Job Executor in the following thread:

Often, dev environments operate only on an in-memory database, such as h2. This makes the dev setup lightweight and easy to set up. Yet, I completely understand that it is desirable to have a dev environment that resembles the production setup. As you’ve observed already, each engine can access the jobs of all other engines when they operate on the same database.
Some logical separation is necessary to isolate them. This can be done via separate schemata or separate databases. I’d recommend having one database (or database schema) per application. If multiple developers work on the same application, changes should be tested locally (if necessary, with an in-memory setup). Only if tests pass, the changes should be deployed to the dev-environment that is used by multiple developers (for the next stage in testing).

Now, to your suggestion: using multi-tenancy with a custom job acquisition mechanism. I think it is theoretically possible. Each job includes its tenant. So, all required information are available, but I think I’d be tedious.