You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/10/24 13:57:39 UTC
[camel] branch main updated (0994d2e2876 -> 6d82a8f4303)
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from 0994d2e2876 CAMEL-18630: camel-jbang - Add get health command
new 6a5499c1419 CAMEL-18148: fixed NPE while sending records
new ff73463f261 CAMEL-18148: adjust callback log settings
new e9efa1104ac CAMEL-18148: API cleanups
new fb845f88420 CAMEL-18148: fixed incorrect interruption handling
new 6d82a8f4303 CAMEL-18148: API cleanups
The 5 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:
.../resume/kafka/SingleNodeKafkaResumeStrategy.java | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
[camel] 04/05: CAMEL-18148: fixed incorrect interruption handling
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit fb845f88420162b396e5a87fdf31d31cefd8d689
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Oct 24 14:40:20 2022 +0200
CAMEL-18148: fixed incorrect interruption handling
---
.../camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
index 744a5b1df05..e175b01fdc3 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
@@ -179,7 +179,7 @@ public class SingleNodeKafkaResumeStrategy implements KafkaResumeStrategy {
}
LOG.trace("Kafka resume strategy initialization complete");
} catch (InterruptedException e) {
- throw new RuntimeException(e);
+ Thread.currentThread().interrupt();
}
}
[camel] 03/05: CAMEL-18148: API cleanups
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit e9efa1104ac5b961f4217d5b57d14236c21db21c
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Oct 24 14:39:31 2022 +0200
CAMEL-18148: API cleanups
---
.../camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
index 6efbfa32950..744a5b1df05 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
* A resume strategy that publishes offsets to a Kafka topic. This resume strategy is suitable for single node
* integrations.
*/
-public class SingleNodeKafkaResumeStrategy<T extends Resumable> implements KafkaResumeStrategy {
+public class SingleNodeKafkaResumeStrategy implements KafkaResumeStrategy {
private static final Logger LOG = LoggerFactory.getLogger(SingleNodeKafkaResumeStrategy.class);
private Consumer<byte[], byte[]> consumer;
[camel] 01/05: CAMEL-18148: fixed NPE while sending records
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6a5499c14193fd06045bc6c093a746d20e21895d
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Oct 24 14:30:47 2022 +0200
CAMEL-18148: fixed NPE while sending records
---
.../camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
index fe7459f9d09..2e2bbaba3fe 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
@@ -105,7 +105,9 @@ public class SingleNodeKafkaResumeStrategy<T extends Resumable> implements Kafka
ProducerRecord<byte[], byte[]> record = new ProducerRecord<>(resumeStrategyConfiguration.getTopic(), key, message);
producer.send(record, (recordMetadata, e) -> {
- LOG.error("Failed to send message {}", e.getMessage(), e);
+ if (e != null) {
+ LOG.error("Failed to send message {}", e.getMessage(), e);
+ }
if (updateCallBack != null) {
updateCallBack.onUpdate(e);
[camel] 02/05: CAMEL-18148: adjust callback log settings
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit ff73463f26160c771f90b8f27bb5ec197e384cc6
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Oct 24 14:35:14 2022 +0200
CAMEL-18148: adjust callback log settings
---
.../camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
index 2e2bbaba3fe..6efbfa32950 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
@@ -111,8 +111,6 @@ public class SingleNodeKafkaResumeStrategy<T extends Resumable> implements Kafka
if (updateCallBack != null) {
updateCallBack.onUpdate(e);
- } else {
- LOG.warn("The is no callback installed for handling errors when producing records to Kafka");
}
});
}
[camel] 05/05: CAMEL-18148: API cleanups
Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6d82a8f430371bcf5b808eaa6c3d71fbf18c9899
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Oct 24 14:41:16 2022 +0200
CAMEL-18148: API cleanups
---
.../processor/resume/kafka/SingleNodeKafkaResumeStrategy.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
index e175b01fdc3..6518311f76e 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/processor/resume/kafka/SingleNodeKafkaResumeStrategy.java
@@ -25,7 +25,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@@ -95,13 +94,10 @@ public class SingleNodeKafkaResumeStrategy implements KafkaResumeStrategy {
* Sends data to a topic. The records will always be sent asynchronously. If there's an error, a producer error
* counter will be increased.
*
- * @param message the message to send
- * @throws ExecutionException
- * @throws InterruptedException
+ * @param message the message to send
*
*/
- protected void produce(byte[] key, byte[] message, UpdateCallBack updateCallBack)
- throws ExecutionException, InterruptedException {
+ protected void produce(byte[] key, byte[] message, UpdateCallBack updateCallBack) {
ProducerRecord<byte[], byte[]> record = new ProducerRecord<>(resumeStrategyConfiguration.getTopic(), key, message);
producer.send(record, (recordMetadata, e) -> {