You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/04/22 10:24:04 UTC

[skywalking] branch master updated: Fix the kafka consumer configuration override bug. (#8929)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6a6f89e2c3 Fix the kafka consumer configuration override bug. (#8929)
6a6f89e2c3 is described below

commit 6a6f89e2c375f42f397364b605906f025588a665
Author: WANG YONG TAO <sd...@foxmail.com>
AuthorDate: Fri Apr 22 18:23:48 2022 +0800

    Fix the kafka consumer configuration override bug. (#8929)
    
    Co-authored-by: wangyongtao <wa...@yiche.com>
---
 docs/en/changes/changes.md                                              | 1 +
 .../oap/server/analyzer/agent/kafka/KafkaFetcherHandlerRegister.java    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 72b39f6515..689f69bdc5 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -25,6 +25,7 @@
 * HTTPServer support the handler register with allowed HTTP methods.
 * [Critical] Revert [**Enhance DataCarrier#MultipleChannelsConsumer to add
   priority**](https://github.com/apache/skywalking/pull/8664) to avoid consuming issues.
+* Fix the problem that some configurations (such as group.id) did not take effect due to the override order when using the kafkaConsumerConfig property to extend the configuration in Kafka Fetcher.
 
 #### UI
 
diff --git a/oap-server/server-fetcher-plugin/kafka-fetcher-plugin/src/main/java/org/apache/skywalking/oap/server/analyzer/agent/kafka/KafkaFetcherHandlerRegister.java b/oap-server/server-fetcher-plugin/kafka-fetcher-plugin/src/main/java/org/apache/skywalking/oap/server/analyzer/agent/kafka/KafkaFetcherHandlerRegister.java
index e548ebea56..49719cc0f1 100644
--- a/oap-server/server-fetcher-plugin/kafka-fetcher-plugin/src/main/java/org/apache/skywalking/oap/server/analyzer/agent/kafka/KafkaFetcherHandlerRegister.java
+++ b/oap-server/server-fetcher-plugin/kafka-fetcher-plugin/src/main/java/org/apache/skywalking/oap/server/analyzer/agent/kafka/KafkaFetcherHandlerRegister.java
@@ -69,9 +69,9 @@ public class KafkaFetcherHandlerRegister {
         this.config = config;
 
         properties = new Properties();
-        properties.putAll(config.getKafkaConsumerConfig());
         properties.setProperty(ConsumerConfig.GROUP_ID_CONFIG, config.getGroupId());
         properties.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, config.getBootstrapServers());
+        properties.putAll(config.getKafkaConsumerConfig());
 
         int threadPoolSize = Runtime.getRuntime().availableProcessors() * 2;
         if (config.getKafkaHandlerThreadPoolSize() > 0) {