This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 4cf4882  CAMEL-17190: camel-quickfix - Add option to turn off eager 
stop engines to have the old behaviour if needed.
4cf4882 is described below

commit 4cf48825c0215b8a349e0e7ab03bc4ddf85212ea
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sun Nov 14 09:27:54 2021 +0100

    CAMEL-17190: camel-quickfix - Add option to turn off eager stop engines to 
have the old behaviour if needed.
---
 .../camel/springboot/catalog/components/quickfix.json    |  1 +
 .../camel-quickfix-starter/src/main/docs/quickfix.json   |  7 +++++++
 .../springboot/QuickfixjComponentConfiguration.java      | 16 ++++++++++++++++
 .../modules/spring-boot/examples/json/quickfix.json      |  7 +++++++
 4 files changed, 31 insertions(+)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/quickfix.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/quickfix.json
index 9cb5912..2fd4a5f 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/quickfix.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/quickfix.json
@@ -22,6 +22,7 @@
     "lenientProperties": false
   },
   "componentProperties": {
+    "eagerStopEngines": { "kind": "property", "displayName": "Eager Stop 
Engines", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "description": "Whether to eager stop engines when 
there are no active consumer or producers using the engine. For example when 
stopping a route, then the engine can be stopped as well. And when the route is 
started, then the engine is  [...]
     "lazyCreateEngines": { "kind": "property", "displayName": "Lazy Create 
Engines", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "description": "If set to true, the engines will 
be created and started when needed (when first message is send)" },
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a me [...]
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
diff --git 
a/components-starter/camel-quickfix-starter/src/main/docs/quickfix.json 
b/components-starter/camel-quickfix-starter/src/main/docs/quickfix.json
index bffc746..1fde5e1 100644
--- a/components-starter/camel-quickfix-starter/src/main/docs/quickfix.json
+++ b/components-starter/camel-quickfix-starter/src/main/docs/quickfix.json
@@ -33,6 +33,13 @@
       "sourceType": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
     },
     {
+      "name": "camel.component.quickfix.eager-stop-engines",
+      "type": "java.lang.Boolean",
+      "description": "Whether to eager stop engines when there are no active 
consumer or producers using the engine. For example when stopping a route, then 
the engine can be stopped as well. And when the route is started, then the 
engine is started again. This can be turned off to only stop the engines when 
Camel is shutdown.",
+      "sourceType": 
"org.apache.camel.component.quickfixj.springboot.QuickfixjComponentConfiguration",
+      "defaultValue": true
+    },
+    {
       "name": "camel.component.quickfix.enabled",
       "type": "java.lang.Boolean",
       "description": "Whether to enable auto configuration of the quickfix 
component. This is enabled by default.",
diff --git 
a/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java
 
b/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java
index 6eeedc4..2d2f865 100644
--- 
a/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java
+++ 
b/components-starter/camel-quickfix-starter/src/main/java/org/apache/camel/component/quickfixj/springboot/QuickfixjComponentConfiguration.java
@@ -41,6 +41,14 @@ public class QuickfixjComponentConfiguration
      */
     private Boolean enabled;
     /**
+     * Whether to eager stop engines when there are no active consumer or
+     * producers using the engine. For example when stopping a route, then the
+     * engine can be stopped as well. And when the route is started, then the
+     * engine is started again. This can be turned off to only stop the engines
+     * when Camel is shutdown.
+     */
+    private Boolean eagerStopEngines = true;
+    /**
      * If set to true, the engines will be created and started when needed 
(when
      * first message is send)
      */
@@ -89,6 +97,14 @@ public class QuickfixjComponentConfiguration
      */
     private MessageStoreFactory messageStoreFactory;
 
+    public Boolean getEagerStopEngines() {
+        return eagerStopEngines;
+    }
+
+    public void setEagerStopEngines(Boolean eagerStopEngines) {
+        this.eagerStopEngines = eagerStopEngines;
+    }
+
     public Boolean getLazyCreateEngines() {
         return lazyCreateEngines;
     }
diff --git a/docs/components/modules/spring-boot/examples/json/quickfix.json 
b/docs/components/modules/spring-boot/examples/json/quickfix.json
index bffc746..1fde5e1 100644
--- a/docs/components/modules/spring-boot/examples/json/quickfix.json
+++ b/docs/components/modules/spring-boot/examples/json/quickfix.json
@@ -33,6 +33,13 @@
       "sourceType": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
     },
     {
+      "name": "camel.component.quickfix.eager-stop-engines",
+      "type": "java.lang.Boolean",
+      "description": "Whether to eager stop engines when there are no active 
consumer or producers using the engine. For example when stopping a route, then 
the engine can be stopped as well. And when the route is started, then the 
engine is started again. This can be turned off to only stop the engines when 
Camel is shutdown.",
+      "sourceType": 
"org.apache.camel.component.quickfixj.springboot.QuickfixjComponentConfiguration",
+      "defaultValue": true
+    },
+    {
       "name": "camel.component.quickfix.enabled",
       "type": "java.lang.Boolean",
       "description": "Whether to enable auto configuration of the quickfix 
component. This is enabled by default.",

Reply via email to