You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2021/03/22 13:03:48 UTC

[camel] branch master updated (5f3dcf4 -> e00be52)

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

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


    from 5f3dcf4  CAMEL-16382: Fixed setting autowried-enabled=false on component level.
     new 7338bbf  Disable checkstyle on camel-bundle-plugin
     new 7d267d4  Enable checkstyle by default
     new e00be52  Fix duplicate field on Kafka component

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/component/kafka/KafkaComponent.java       | 21 +--------------------
 init/camel-bundle-plugin/pom.xml                    |  6 ++++++
 parent/pom.xml                                      |  4 ++++
 3 files changed, 11 insertions(+), 20 deletions(-)

[camel] 02/03: Enable checkstyle by default

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7d267d49266ff268a41883de5bfcedac48644b58
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Mar 22 13:06:41 2021 +0100

    Enable checkstyle by default
---
 parent/pom.xml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/parent/pom.xml b/parent/pom.xml
index 08edbea..80c2aeb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -4489,6 +4489,10 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>${maven-surefire-plugin-version}</version>
                 <configuration>

[camel] 01/03: Disable checkstyle on camel-bundle-plugin

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7338bbf51c95519193eefa3f132659828515941f
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Mar 22 13:02:44 2021 +0100

    Disable checkstyle on camel-bundle-plugin
---
 init/camel-bundle-plugin/pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/init/camel-bundle-plugin/pom.xml b/init/camel-bundle-plugin/pom.xml
index 03c3a33..c6ebf6b 100644
--- a/init/camel-bundle-plugin/pom.xml
+++ b/init/camel-bundle-plugin/pom.xml
@@ -34,6 +34,12 @@
     <name>Camel :: Maven Plugins :: Enhanced Bundle Plugin</name>
     <description>OSGi Bundle plugin detecting stale input</description>
 
+    <properties>
+        <sourcecheckExcludesComma>
+            **/*.java,
+        </sourcecheckExcludesComma>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.felix</groupId>

Re: [camel] 03/03: Fix duplicate field on Kafka component

Posted by Andrea Cosentino <an...@gmail.com>.
Gregor is rebuilding with this fix

Il giorno lun 22 mar 2021 alle ore 14:20 Claus Ibsen <cl...@gmail.com>
ha scritto:

> This looks really wrong. I need to check this when I am done with
> something else.
> We need that option annotated with the metadata
>
> On Mon, Mar 22, 2021 at 2:03 PM <gn...@apache.org> wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > gnodet pushed a commit to branch master
> > in repository https://gitbox.apache.org/repos/asf/camel.git
> >
> > commit e00be52c186bc926a27a31164c6f5fe1cb69ca49
> > Author: Guillaume Nodet <gn...@gmail.com>
> > AuthorDate: Mon Mar 22 14:02:59 2021 +0100
> >
> >     Fix duplicate field on Kafka component
> > ---
> >  .../camel/component/kafka/KafkaComponent.java       | 21
> +--------------------
> >  1 file changed, 1 insertion(+), 20 deletions(-)
> >
> > diff --git
> a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> > index dff7fd2..aa536ea 100644
> > ---
> a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> > +++
> b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> > @@ -39,10 +39,9 @@ public class KafkaComponent extends DefaultComponent
> implements SSLContextParame
> >      private KafkaClientFactory kafkaClientFactory = new
> DefaultKafkaClientFactory();
> >      @Metadata(autowired = true, label = "consumer,advanced")
> >      private PollExceptionStrategy pollExceptionStrategy;
> > -    @Metadata(label = "consumer", defaultValue = "ERROR_HANDLER")
> > -    private PollOnError pollOnError = PollOnError.ERROR_HANDLER;
> >
> >      public KafkaComponent() {
> > +        configuration.setPollOnError(PollOnError.ERROR_HANDLER);
> >      }
> >
> >      public KafkaComponent(CamelContext context) {
> > @@ -64,7 +63,6 @@ public class KafkaComponent extends DefaultComponent
> implements SSLContextParame
> >          KafkaConfiguration copy = getConfiguration().copy();
> >          endpoint.setConfiguration(copy);
> >          endpoint.getConfiguration().setTopic(remaining);
> > -        endpoint.getConfiguration().setPollOnError(pollOnError);
> >
> >          setProperties(endpoint, parameters);
> >
> > @@ -142,21 +140,4 @@ public class KafkaComponent extends
> DefaultComponent implements SSLContextParame
> >          this.pollExceptionStrategy = pollExceptionStrategy;
> >      }
> >
> > -    public PollOnError getPollOnError() {
> > -        return pollOnError;
> > -    }
> > -
> > -    /**
> > -     * What to do if kafka threw an exception while polling for new
> messages.
> > -     *
> > -     * The default is ERROR_HANDLER.
> > -     *
> > -     * DISCARD will discard the message and continue to poll next
> message. ERROR_HANDLER will use Camel's error handler
> > -     * to process the exception, and afterwards continue to poll next
> message. RECONNECT will re-connect the consumer
> > -     * and try poll the message again RETRY will let the consumer retry
> polling the same message again STOP will stop
> > -     * the consumer (have to be manually started/restarted if the
> consumer should be able to consume messages again)
> > -     */
> > -    public void setPollOnError(PollOnError pollOnError) {
> > -        this.pollOnError = pollOnError;
> > -    }
> >  }
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: [camel] 03/03: Fix duplicate field on Kafka component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah the field is on the configuration class also, which gets
"inherited" on the component level too.
So this is correct.

On Mon, Mar 22, 2021 at 2:19 PM Claus Ibsen <cl...@gmail.com> wrote:
>
> This looks really wrong. I need to check this when I am done with
> something else.
> We need that option annotated with the metadata
>
> On Mon, Mar 22, 2021 at 2:03 PM <gn...@apache.org> wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > gnodet pushed a commit to branch master
> > in repository https://gitbox.apache.org/repos/asf/camel.git
> >
> > commit e00be52c186bc926a27a31164c6f5fe1cb69ca49
> > Author: Guillaume Nodet <gn...@gmail.com>
> > AuthorDate: Mon Mar 22 14:02:59 2021 +0100
> >
> >     Fix duplicate field on Kafka component
> > ---
> >  .../camel/component/kafka/KafkaComponent.java       | 21 +--------------------
> >  1 file changed, 1 insertion(+), 20 deletions(-)
> >
> > diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> > index dff7fd2..aa536ea 100644
> > --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> > +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> > @@ -39,10 +39,9 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
> >      private KafkaClientFactory kafkaClientFactory = new DefaultKafkaClientFactory();
> >      @Metadata(autowired = true, label = "consumer,advanced")
> >      private PollExceptionStrategy pollExceptionStrategy;
> > -    @Metadata(label = "consumer", defaultValue = "ERROR_HANDLER")
> > -    private PollOnError pollOnError = PollOnError.ERROR_HANDLER;
> >
> >      public KafkaComponent() {
> > +        configuration.setPollOnError(PollOnError.ERROR_HANDLER);
> >      }
> >
> >      public KafkaComponent(CamelContext context) {
> > @@ -64,7 +63,6 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
> >          KafkaConfiguration copy = getConfiguration().copy();
> >          endpoint.setConfiguration(copy);
> >          endpoint.getConfiguration().setTopic(remaining);
> > -        endpoint.getConfiguration().setPollOnError(pollOnError);
> >
> >          setProperties(endpoint, parameters);
> >
> > @@ -142,21 +140,4 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
> >          this.pollExceptionStrategy = pollExceptionStrategy;
> >      }
> >
> > -    public PollOnError getPollOnError() {
> > -        return pollOnError;
> > -    }
> > -
> > -    /**
> > -     * What to do if kafka threw an exception while polling for new messages.
> > -     *
> > -     * The default is ERROR_HANDLER.
> > -     *
> > -     * DISCARD will discard the message and continue to poll next message. ERROR_HANDLER will use Camel's error handler
> > -     * to process the exception, and afterwards continue to poll next message. RECONNECT will re-connect the consumer
> > -     * and try poll the message again RETRY will let the consumer retry polling the same message again STOP will stop
> > -     * the consumer (have to be manually started/restarted if the consumer should be able to consume messages again)
> > -     */
> > -    public void setPollOnError(PollOnError pollOnError) {
> > -        this.pollOnError = pollOnError;
> > -    }
> >  }
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: [camel] 03/03: Fix duplicate field on Kafka component

Posted by Claus Ibsen <cl...@gmail.com>.
This looks really wrong. I need to check this when I am done with
something else.
We need that option annotated with the metadata

On Mon, Mar 22, 2021 at 2:03 PM <gn...@apache.org> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> gnodet pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/camel.git
>
> commit e00be52c186bc926a27a31164c6f5fe1cb69ca49
> Author: Guillaume Nodet <gn...@gmail.com>
> AuthorDate: Mon Mar 22 14:02:59 2021 +0100
>
>     Fix duplicate field on Kafka component
> ---
>  .../camel/component/kafka/KafkaComponent.java       | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> index dff7fd2..aa536ea 100644
> --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
> @@ -39,10 +39,9 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
>      private KafkaClientFactory kafkaClientFactory = new DefaultKafkaClientFactory();
>      @Metadata(autowired = true, label = "consumer,advanced")
>      private PollExceptionStrategy pollExceptionStrategy;
> -    @Metadata(label = "consumer", defaultValue = "ERROR_HANDLER")
> -    private PollOnError pollOnError = PollOnError.ERROR_HANDLER;
>
>      public KafkaComponent() {
> +        configuration.setPollOnError(PollOnError.ERROR_HANDLER);
>      }
>
>      public KafkaComponent(CamelContext context) {
> @@ -64,7 +63,6 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
>          KafkaConfiguration copy = getConfiguration().copy();
>          endpoint.setConfiguration(copy);
>          endpoint.getConfiguration().setTopic(remaining);
> -        endpoint.getConfiguration().setPollOnError(pollOnError);
>
>          setProperties(endpoint, parameters);
>
> @@ -142,21 +140,4 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
>          this.pollExceptionStrategy = pollExceptionStrategy;
>      }
>
> -    public PollOnError getPollOnError() {
> -        return pollOnError;
> -    }
> -
> -    /**
> -     * What to do if kafka threw an exception while polling for new messages.
> -     *
> -     * The default is ERROR_HANDLER.
> -     *
> -     * DISCARD will discard the message and continue to poll next message. ERROR_HANDLER will use Camel's error handler
> -     * to process the exception, and afterwards continue to poll next message. RECONNECT will re-connect the consumer
> -     * and try poll the message again RETRY will let the consumer retry polling the same message again STOP will stop
> -     * the consumer (have to be manually started/restarted if the consumer should be able to consume messages again)
> -     */
> -    public void setPollOnError(PollOnError pollOnError) {
> -        this.pollOnError = pollOnError;
> -    }
>  }



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

[camel] 03/03: Fix duplicate field on Kafka component

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e00be52c186bc926a27a31164c6f5fe1cb69ca49
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Mar 22 14:02:59 2021 +0100

    Fix duplicate field on Kafka component
---
 .../camel/component/kafka/KafkaComponent.java       | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
index dff7fd2..aa536ea 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
@@ -39,10 +39,9 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
     private KafkaClientFactory kafkaClientFactory = new DefaultKafkaClientFactory();
     @Metadata(autowired = true, label = "consumer,advanced")
     private PollExceptionStrategy pollExceptionStrategy;
-    @Metadata(label = "consumer", defaultValue = "ERROR_HANDLER")
-    private PollOnError pollOnError = PollOnError.ERROR_HANDLER;
 
     public KafkaComponent() {
+        configuration.setPollOnError(PollOnError.ERROR_HANDLER);
     }
 
     public KafkaComponent(CamelContext context) {
@@ -64,7 +63,6 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
         KafkaConfiguration copy = getConfiguration().copy();
         endpoint.setConfiguration(copy);
         endpoint.getConfiguration().setTopic(remaining);
-        endpoint.getConfiguration().setPollOnError(pollOnError);
 
         setProperties(endpoint, parameters);
 
@@ -142,21 +140,4 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame
         this.pollExceptionStrategy = pollExceptionStrategy;
     }
 
-    public PollOnError getPollOnError() {
-        return pollOnError;
-    }
-
-    /**
-     * What to do if kafka threw an exception while polling for new messages.
-     *
-     * The default is ERROR_HANDLER.
-     *
-     * DISCARD will discard the message and continue to poll next message. ERROR_HANDLER will use Camel's error handler
-     * to process the exception, and afterwards continue to poll next message. RECONNECT will re-connect the consumer
-     * and try poll the message again RETRY will let the consumer retry polling the same message again STOP will stop
-     * the consumer (have to be manually started/restarted if the consumer should be able to consume messages again)
-     */
-    public void setPollOnError(PollOnError pollOnError) {
-        this.pollOnError = pollOnError;
-    }
 }