forked from camunda/camunda-bpm-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(quarkus): use a separate camunda thread pool (camunda#1571)
* Use a ThreadPoolExecutor instead of the Quarkus core thread pool Executor for the Camunda JobExecutor. * Refactor the JobExecutor configuration properties to generic ones that are always up-to-date with the process engine changes. Related to CAM-13811
- Loading branch information
1 parent
6f03067
commit bdf683b
Showing
20 changed files
with
216 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,6 @@ faces-config.NavData | |
*.lock.db | ||
**/overlays | ||
**/node_modules | ||
camunda-h2-dbs | ||
|
||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
quarkus-extension/engine/deployment/src/test/resources/job-executor-application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
quarkus.camunda.bpm.job-executor.thread-pool.max-pool-size=12 | ||
quarkus.camunda.bpm.job-executor.thread-pool.queue-size=5 | ||
quarkus.camunda.job-executor.thread-pool.max-pool-size=12 | ||
quarkus.camunda.job-executor.thread-pool.queue-size=5 | ||
|
||
quarkus.camunda.bpm.job-executor.max-jobs-per-acquisition=5 | ||
quarkus.camunda.bpm.job-executor.lock-time-in-millis=500000 | ||
quarkus.camunda.bpm.job-executor.wait-time-in-millis=7000 | ||
quarkus.camunda.bpm.job-executor.max-wait=65000 | ||
quarkus.camunda.bpm.job-executor.backoff-time-in-millis=5 | ||
quarkus.camunda.bpm.job-executor.max-backoff=5 | ||
quarkus.camunda.bpm.job-executor.backoff-decrease-threshold=120 | ||
quarkus.camunda.bpm.job-executor.wait-increase-factor=3 | ||
quarkus.camunda.job-executor.max-jobs-per-acquisition=5 | ||
quarkus.camunda.job-executor.lock-time-in-millis=500000 | ||
quarkus.camunda.job-executor.wait-time-in-millis=7000 | ||
quarkus.camunda.job-executor.max-wait=65000 | ||
quarkus.camunda.job-executor.backoff-time-in-millis=5 | ||
quarkus.camunda.job-executor.max-backoff=5 | ||
quarkus.camunda.job-executor.backoff-decrease-threshold=120 | ||
quarkus.camunda.job-executor.wait-increase-factor=3 | ||
|
||
quarkus.datasource.jdbc.url=jdbc:h2:mem:camunda;MVCC=TRUE;TRACE_LEVEL_FILE=0;DB_CLOSE_ON_EXIT=FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...time/src/main/java/org/camunda/bpm/quarkus/engine/extension/CamundaJobExecutorConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
* under one or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information regarding copyright | ||
* ownership. Camunda licenses this file to you under the Apache License, | ||
* Version 2.0; you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.camunda.bpm.quarkus.engine.extension; | ||
|
||
import java.util.Map; | ||
|
||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
import io.quarkus.runtime.annotations.ConfigItem; | ||
|
||
@ConfigGroup | ||
public class CamundaJobExecutorConfig { | ||
|
||
/** | ||
* The Camunda JobExecutor configuration properties. For more details, see | ||
* {@link https://docs.camunda.org/manual/latest/reference/deployment-descriptors/tags/job-executor/#job-acquisition-configuration-properties} | ||
*/ | ||
@ConfigItem(name = ConfigItem.PARENT) | ||
public Map<String, String> genericConfig; | ||
|
||
/** | ||
* The Camunda JobExecutor thread pool config. This thread pool is responsible for running | ||
* Camunda jobs. | ||
*/ | ||
@ConfigItem | ||
public ThreadPoolConfig threadPool; | ||
|
||
@ConfigGroup | ||
public static class ThreadPoolConfig { | ||
/** | ||
* Sets the maximum number of threads that can be present in the Quarkus-managed | ||
* thread pool for the Camunda JobExecutor. The default value is 10. | ||
*/ | ||
@ConfigItem(defaultValue = "10") | ||
public int maxPoolSize; | ||
|
||
/** | ||
* Sets the size of the Quarkus-managed JobExecutor queue. The default value is 3. | ||
*/ | ||
@ConfigItem(defaultValue = "3") | ||
public int queueSize; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.