camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: CAMEL-9835: Enable kafka consumer to subcribe to multiple topics
Date Fri, 08 Apr 2016 11:28:17 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 1749f36c4 -> a8f32d4ec


CAMEL-9835: Enable kafka consumer to subcribe to multiple topics


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a8f32d4e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a8f32d4e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a8f32d4e

Branch: refs/heads/camel-2.17.x
Commit: a8f32d4ec485419cd196988f0de938d6f9b3cc49
Parents: 1749f36
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Fri Apr 8 13:26:49 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Fri Apr 8 13:26:49 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/kafka/KafkaConsumer.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a8f32d4e/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
----------------------------------------------------------------------
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 ab3f9f2..d4cfe49 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
@@ -103,7 +103,7 @@ public class KafkaConsumer extends DefaultConsumer {
             int processed = 0;
             try {
                 LOG.debug("Subscribing {} to topic {}", threadId, topicName);
-                consumer.subscribe(Arrays.asList(topicName));
+                consumer.subscribe(Arrays.asList(topicName.split(",")));
                 while (isRunAllowed() && !isSuspendingOrSuspended()) {
                     ConsumerRecords<Object, Object> records = consumer.poll(Long.MAX_VALUE);
                     for (ConsumerRecord<Object, Object> record : records) {


Mime
View raw message