You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/11/12 09:35:29 UTC

[camel] 01/03: CAMEL-14169: Make it easier to configure global endpoint options once

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

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1e1134834d9d03e8c11b260e59e434d950903888
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Nov 12 09:52:31 2019 +0100

    CAMEL-14169: Make it easier to configure global endpoint options once
---
 .../main/java/org/apache/camel/CamelContext.java   |  5 ++
 .../apache/camel/GlobalEndpointConfiguration.java  | 53 +++++++++++++
 .../camel/impl/engine/AbstractCamelContext.java    |  7 ++
 .../engine/DefaultGlobalEndpointConfiguration.java | 56 ++++++++++++++
 .../apache/camel/impl/LazyStartProducerTest.java   | 31 ++++++++
 .../camel/main/DefaultConfigurationConfigurer.java |  5 ++
 .../camel/main/DefaultConfigurationProperties.java | 88 ++++++++++++++++++++++
 .../org/apache/camel/support/DefaultComponent.java | 65 +++++++++++++++-
 .../org/apache/camel/support/DefaultEndpoint.java  |  6 +-
 9 files changed, 310 insertions(+), 6 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
index 1eb0633..cfe73b5 100644
--- a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
+++ b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
@@ -504,6 +504,11 @@ public interface CamelContext extends StatefulService, RuntimeConfiguration {
      */
     Collection<Endpoint> removeEndpoints(String pattern) throws Exception;
 
+    /**
+     * Gets the global endpoint configuration, where you can configure common endpoint options.
+     */
+    GlobalEndpointConfiguration getGlobalEndpointConfiguration();
+
     // Route Management Methods
     //-----------------------------------------------------------------------
 
diff --git a/core/camel-api/src/main/java/org/apache/camel/GlobalEndpointConfiguration.java b/core/camel-api/src/main/java/org/apache/camel/GlobalEndpointConfiguration.java
new file mode 100644
index 0000000..77705fe
--- /dev/null
+++ b/core/camel-api/src/main/java/org/apache/camel/GlobalEndpointConfiguration.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); 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.apache.camel;
+
+/**
+ * Global endpoint configurations which can be set as defaults when Camel creates new {@link Endpoint}s.
+ */
+public interface GlobalEndpointConfiguration {
+
+    boolean isLazyStartProducer();
+
+    /**
+     * 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 starting and cause the route to fail being started. By deferring this startup to be lazy then
+     * the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed
+     * then creating and starting the producer may take a little time and prolong the total processing time of the processing.
+     */
+    void setLazyStartProducer(boolean lazyStartProducer);
+
+    boolean isBridgeErrorHandler();
+
+    /**
+     * 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 message and
+     * handled by the routing Error Handler.
+     * <p/>
+     * By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions,
+     * that will be logged at WARN/ERROR level and ignored.
+     */
+    void setBridgeErrorHandler(boolean bridgeErrorHandler);
+
+    boolean isBasicPropertyBinding();
+
+    /**
+     * Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities.
+     */
+    void setBasicPropertyBinding(boolean basicPropertyBinding);
+
+}
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 69e0453..9c3681c 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -54,6 +54,7 @@ import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.ExtendedStartupListener;
 import org.apache.camel.FailedToStartRouteException;
 import org.apache.camel.FluentProducerTemplate;
+import org.apache.camel.GlobalEndpointConfiguration;
 import org.apache.camel.IsSingleton;
 import org.apache.camel.MultipleConsumersSupport;
 import org.apache.camel.NoFactoryAvailableException;
@@ -173,6 +174,7 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
     private ClassLoader applicationContextClassLoader;
     private final AtomicInteger endpointKeyCounter = new AtomicInteger();
     private final List<EndpointStrategy> endpointStrategies = new ArrayList<>();
+    private final GlobalEndpointConfiguration globalEndpointConfiguration = new DefaultGlobalEndpointConfiguration();
     private final Map<String, Component> components = new ConcurrentHashMap<>();
     private final Set<Route> routes = new LinkedHashSet<>();
     private final List<Service> servicesToStop = new CopyOnWriteArrayList<>();
@@ -1024,6 +1026,11 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
         }
     }
 
+    @Override
+    public GlobalEndpointConfiguration getGlobalEndpointConfiguration() {
+        return globalEndpointConfiguration;
+    }
+
     // Route Management Methods
     // -----------------------------------------------------------------------
 
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultGlobalEndpointConfiguration.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultGlobalEndpointConfiguration.java
new file mode 100644
index 0000000..129db24
--- /dev/null
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultGlobalEndpointConfiguration.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); 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.apache.camel.impl.engine;
+
+import org.apache.camel.GlobalEndpointConfiguration;
+
+public final class DefaultGlobalEndpointConfiguration implements GlobalEndpointConfiguration {
+
+    private boolean lazyStartProducer;
+    private boolean bridgeErrorHandler;
+    private boolean basicPropertyBinding;
+
+    @Override
+    public boolean isLazyStartProducer() {
+        return lazyStartProducer;
+    }
+
+    @Override
+    public void setLazyStartProducer(boolean lazyStartProducer) {
+        this.lazyStartProducer = lazyStartProducer;
+    }
+
+    @Override
+    public boolean isBridgeErrorHandler() {
+        return bridgeErrorHandler;
+    }
+
+    @Override
+    public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+        this.bridgeErrorHandler = bridgeErrorHandler;
+    }
+
+    @Override
+    public boolean isBasicPropertyBinding() {
+        return basicPropertyBinding;
+    }
+
+    @Override
+    public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+        this.basicPropertyBinding = basicPropertyBinding;
+    }
+}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java
index f6c0749..d62c629 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/LazyStartProducerTest.java
@@ -18,7 +18,10 @@ package org.apache.camel.impl;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
+import org.apache.camel.component.log.LogComponent;
+import org.apache.camel.component.log.LogEndpoint;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.support.LazyStartProducer;
 import org.apache.camel.support.service.ServiceHelper;
 import org.junit.Test;
@@ -65,4 +68,32 @@ public class LazyStartProducerTest extends ContextTestSupport {
 
         assertMockEndpointsSatisfied();
     }
+
+    @Test
+    public void lazyStartProducerGlobal() throws Exception {
+        context.getGlobalEndpointConfiguration().setLazyStartProducer(true);
+
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        assertTrue(mock.isLazyStartProducer());
+
+        LogEndpoint log = getMandatoryEndpoint("log:foo", LogEndpoint.class);
+        assertTrue(log.isLazyStartProducer());
+    }
+
+    @Test
+    public void lazyStartProducerComponent() throws Exception {
+        context.getComponent("log", LogComponent.class).setLazyStartProducer(true);
+
+        LogEndpoint log = getMandatoryEndpoint("log:foo", LogEndpoint.class);
+        assertTrue(log.isLazyStartProducer());
+
+        // but mock is false
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        assertFalse(mock.isLazyStartProducer());
+
+        // but we can override this via parameter
+        MockEndpoint mock2 = getMockEndpoint("mock:foo?lazyStartProducer=true");
+        assertTrue(mock2.isLazyStartProducer());
+    }
+
 }
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
index d0b889d..9b21acc 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
@@ -156,6 +156,11 @@ public final class DefaultConfigurationConfigurer {
             camelContext.getManagementStrategy().getManagementAgent().setCreateConnector(config.isJmxCreateConnector());
         }
 
+        // global endpoint configurations
+        camelContext.getGlobalEndpointConfiguration().setBasicPropertyBinding(config.isEndpointBasicPropertyBinding());
+        camelContext.getGlobalEndpointConfiguration().setBridgeErrorHandler(config.isEndpointBridgeErrorHandler());
+        camelContext.getGlobalEndpointConfiguration().setLazyStartProducer(config.isEndpointLazyStartProducer());
+
         camelContext.setBacklogTracing(config.isBacklogTracing());
         camelContext.setTracing(config.isTracing());
         camelContext.setTracingPattern(config.getTracingPattern());
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index c90aa66..7d2c955 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -59,6 +59,9 @@ public abstract class DefaultConfigurationProperties<T> {
     private boolean autoStartup = true;
     private boolean allowUseOriginalMessage;
     private boolean endpointRuntimeStatisticsEnabled;
+    private boolean endpointLazyStartProducer;
+    private boolean endpointBridgeErrorHandler;
+    private boolean endpointBasicPropertyBinding;
     private boolean useDataType;
     private boolean useBreadcrumb;
     private ManagementStatisticsLevel jmxManagementStatisticsLevel = ManagementStatisticsLevel.Default;
@@ -521,6 +524,53 @@ public abstract class DefaultConfigurationProperties<T> {
         this.endpointRuntimeStatisticsEnabled = endpointRuntimeStatisticsEnabled;
     }
 
+    public boolean isEndpointLazyStartProducer() {
+        return endpointLazyStartProducer;
+    }
+
+    /**
+     * 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 starting and cause the route to fail being started. By deferring this startup to be lazy then
+     * the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed
+     * then creating and starting the producer may take a little time and prolong the total processing time of the processing.
+     *
+     * The default value is false.
+     */
+    public void setEndpointLazyStartProducer(boolean endpointLazyStartProducer) {
+        this.endpointLazyStartProducer = endpointLazyStartProducer;
+    }
+
+    public boolean isEndpointBridgeErrorHandler() {
+        return endpointBridgeErrorHandler;
+    }
+
+    /**
+     * 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 message and
+     * handled by the routing Error Handler.
+     * <p/>
+     * By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions,
+     * that will be logged at WARN/ERROR level and ignored.
+     *
+     * The default value is false.
+     */
+    public void setEndpointBridgeErrorHandler(boolean endpointBridgeErrorHandler) {
+        this.endpointBridgeErrorHandler = endpointBridgeErrorHandler;
+    }
+
+    public boolean isEndpointBasicPropertyBinding() {
+        return endpointBasicPropertyBinding;
+    }
+
+    /**
+     * Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities.
+     *
+     * The default value is false.
+     */
+    public void setEndpointBasicPropertyBinding(boolean endpointBasicPropertyBinding) {
+        this.endpointBasicPropertyBinding = endpointBasicPropertyBinding;
+    }
+
     public boolean isUseDataType() {
         return useDataType;
     }
@@ -1137,6 +1187,44 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
+     * 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 starting and cause the route to fail being started. By deferring this startup to be lazy then
+     * the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed
+     * then creating and starting the producer may take a little time and prolong the total processing time of the processing.
+     *
+     * The default value is false.
+     */
+    public T withEndpointLazyStartProducer(boolean endpointLazyStartProducer) {
+        this.endpointLazyStartProducer = endpointLazyStartProducer;
+        return (T) this;
+    }
+
+    /**
+     * 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 message and
+     * handled by the routing Error Handler.
+     * <p/>
+     * By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions,
+     * that will be logged at WARN/ERROR level and ignored.
+     *
+     * The default value is false.
+     */
+    public T withEndpointBridgeErrorHandler(boolean endpointBridgeErrorHandler) {
+        this.endpointBridgeErrorHandler = endpointBridgeErrorHandler;
+        return (T) this;
+    }
+
+    /**
+     * Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities.
+     *
+     * The default value is false.
+     */
+    public T withEndpointBasicPropertyBinding(boolean endpointBasicPropertyBinding) {
+        this.endpointBasicPropertyBinding = endpointBasicPropertyBinding;
+        return (T) this;
+    }
+
+    /**
      * Whether to enable using data type on Camel messages.
      *
      * Data type are automatic turned on if one ore more routes has been explicit configured with input and output types.
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultComponent.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultComponent.java
index 723c48e..2e707ff 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultComponent.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultComponent.java
@@ -67,6 +67,16 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone
     @Metadata(label = "advanced",
         description = "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities")
     private boolean basicPropertyBinding;
+    @Metadata(label = "consumer", 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 message and handled by the routing Error Handler."
+            + " By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.")
+    private boolean bridgeErrorHandler;
+    @Metadata(label = "producer",
+            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 starting and cause the route to fail being started. By deferring this startup to be lazy then"
+                    + " the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed"
+                    + " then creating and starting the producer may take a little time and prolong the total processing time of the processing.")
+    private boolean lazyStartProducer;
 
     public DefaultComponent() {
     }
@@ -211,12 +221,31 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone
         // inject camel context
         endpoint.setCamelContext(getCamelContext());
 
-        // setup whether to use basic property binding or not which must be done before we set properties
-        boolean basic = getAndRemoveParameter(parameters, "basicPropertyBinding", boolean.class, basicPropertyBinding);
+        // setup global options
         if (endpoint instanceof DefaultEndpoint) {
-            ((DefaultEndpoint) endpoint).setBasicPropertyBinding(basic);
+            DefaultEndpoint de = (DefaultEndpoint) endpoint;
+            de.setBasicPropertyBinding(getCamelContext().getGlobalEndpointConfiguration().isBasicPropertyBinding());;
+            de.setBridgeErrorHandler(getCamelContext().getGlobalEndpointConfiguration().isBridgeErrorHandler());;
+            de.setLazyStartProducer(getCamelContext().getGlobalEndpointConfiguration().isLazyStartProducer());;
+        }
+
+        // setup global options which must be done before we set properties
+        if (endpoint instanceof DefaultEndpoint) {
+            DefaultEndpoint de = (DefaultEndpoint) endpoint;
+            boolean defaultBasic = basicPropertyBinding ? basicPropertyBinding : getCamelContext().getGlobalEndpointConfiguration().isBasicPropertyBinding();
+            boolean basic = getAndRemoveParameter(parameters, "basicPropertyBinding", boolean.class, defaultBasic);
+            de.setBasicPropertyBinding(basic);
+
+            boolean defaultBridge = bridgeErrorHandler ? bridgeErrorHandler : getCamelContext().getGlobalEndpointConfiguration().isBridgeErrorHandler();
+            boolean bridge = getAndRemoveParameter(parameters, "bridgeErrorHandler", boolean.class, defaultBridge);
+            de.setBridgeErrorHandler(bridge);
+
+            boolean defaultLazy = lazyStartProducer ? lazyStartProducer : getCamelContext().getGlobalEndpointConfiguration().isLazyStartProducer();
+            boolean lazy = getAndRemoveParameter(parameters, "lazyStartProducer", boolean.class, defaultLazy);
+            de.setLazyStartProducer(lazy);
         }
 
+        // configure parameters
         endpoint.configureProperties(parameters);
         if (useIntrospectionOnEndpoint()) {
             setProperties(endpoint, parameters);
@@ -252,6 +281,36 @@ public abstract class DefaultComponent extends ServiceSupport implements Compone
         this.basicPropertyBinding = basicPropertyBinding;
     }
 
+    public boolean isLazyStartProducer() {
+        return lazyStartProducer;
+    }
+
+    /**
+     * 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 starting and cause the route to fail being started. By deferring this startup to be lazy then
+     * the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed
+     * then creating and starting the producer may take a little time and prolong the total processing time of the processing.
+     */
+    public void setLazyStartProducer(boolean lazyStartProducer) {
+        this.lazyStartProducer = lazyStartProducer;
+    }
+
+    public boolean isBridgeErrorHandler() {
+        return bridgeErrorHandler;
+    }
+
+    /**
+     * 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 message and
+     * handled by the routing Error Handler.
+     * <p/>
+     * By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions,
+     * that will be logged at WARN/ERROR level and ignored.
+     */
+    public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+        this.bridgeErrorHandler = bridgeErrorHandler;
+    }
+
     /**
      * Strategy to do post configuration logic.
      * <p/>
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultEndpoint.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultEndpoint.java
index c796dd8..c32a403 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultEndpoint.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultEndpoint.java
@@ -61,7 +61,7 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint
                     + " the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed"
                     + " then creating and starting the producer may take a little time and prolong the total processing time of the processing.")
     private boolean lazyStartProducer;
-    @UriParam(label = "consumer", optionalPrefix = "consumer.", description = "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while"
+    @UriParam(label = "consumer", 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 message and handled by the routing Error Handler."
                     + " By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.")
     private boolean bridgeErrorHandler;
@@ -311,8 +311,8 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint
 
     /**
      * To let the consumer use a custom ExceptionHandler.
-     + Notice if the option bridgeErrorHandler is enabled then this options is not in use.
-     + By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored.
+     * Notice if the option bridgeErrorHandler is enabled then this options is not in use.
+     * By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored.
      */
     public void setExceptionHandler(ExceptionHandler exceptionHandler) {
         this.exceptionHandler = exceptionHandler;