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 2020/12/10 09:46:59 UTC
[camel] branch master updated: camel-kafka - Add debug logging for
topic partition id when committing.
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
The following commit(s) were added to refs/heads/master by this push:
new 5445f41 camel-kafka - Add debug logging for topic partition id when committing.
5445f41 is described below
commit 5445f41ef6e91cef7ff3e8a07721743afe7893a0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 10 10:46:35 2020 +0100
camel-kafka - Add debug logging for topic partition id when committing.
---
.../main/java/org/apache/camel/component/kafka/KafkaConsumer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
index f406125..fc51f58 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
@@ -451,11 +451,13 @@ public class KafkaConsumer extends DefaultConsumer {
boolean forceCommit) {
if (partitionLastOffset != -1) {
if (!endpoint.getConfiguration().isAllowManualCommit() && offsetRepository != null) {
- LOG.debug("Saving offset repository state {} from topic {} with offset: {}", threadId, topicName,
+ LOG.debug("Saving offset repository state {} [topic: {} partition: {} offset: {}]", threadId, topicName,
+ partition.partition(),
partitionLastOffset);
offsetRepository.setState(serializeOffsetKey(partition), serializeOffsetValue(partitionLastOffset));
} else if (forceCommit) {
- LOG.debug("Forcing commitSync {} from topic {} with offset: {}", threadId, topicName, partitionLastOffset);
+ LOG.debug("Forcing commitSync {} [topic: {} partition: {} offset: {}]", threadId, topicName,
+ partition.partition(), partitionLastOffset);
consumer.commitSync(Collections.singletonMap(partition, new OffsetAndMetadata(partitionLastOffset + 1)));
}
}