For Users > User Guide > Job Concurrency
Was this helpful?
Job Concurrency
By default, all Integration Manager jobs run in parallel, up to the concurrency, which is the number of engines or nodes that you have licensed. Most of the time, different kinds of jobs can run concurrently without issue.
Sometimes, however, the same job running concurrently may have undesirable outcome, meaning the integration may not be idempotent.
Some examples:
Actions on a database are not atomic (global transaction logic)
Common local files are used for lookup (and potentially updated with new information on a regular basis)
A configuration that is scheduled to run every 15 minutes but occasionally takes longer and overlaps
In these scenarios, you can protect your data without complex integration logic by using a job execution mutex.
Job Execution Mutex
Strictly speaking, a mutex is a locking mechanism used to synchronize access to a resource. Only one task (which can be a thread or process based on OS abstraction) can acquire the mutex. It means ownership is associated with a mutex, and only the owner can release the lock (mutex).
You may configure a job execution mutex in Integration Server for any configuration. In essence, this prevents running multiple jobs for the same configuration at the same time.
Note:  If worker.concurrency=1 and you only have one Worker, then jobs will never execute concurrently. In this case, using a job execution mutex is overkill.
To enable the mutex for a job configuration, you simply set the “blocking” property to true (blocking is false by default).
You can accomplish this using a simple API PATCH method:
PATCH /api/jobconfigs/76394 HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzY29wZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfVVNFUiJdLCJpZCI7MSwiYWNjb3VudCI6MSwic

{"blocking": true}
Prerequisites
Your Integration Manager Server Admin must have the ZooKeeper configuration enabled and connected. For more information, see Install and Configure Apache ZooKeeper (Windows).
 
Last modified date: 03/14/2022