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-9978: Camel-Kafka: configuration type mismatch for parameter acks
Date Fri, 20 May 2016 12:26:35 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 9e903aebb -> f25c0e282


CAMEL-9978: Camel-Kafka: configuration type mismatch for parameter acks


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

Branch: refs/heads/camel-2.17.x
Commit: f25c0e2821c14f59fc49836d39060c14774094e8
Parents: 9e903ae
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Fri May 20 14:17:53 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Fri May 20 14:23:38 2016 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/kafka/KafkaConfiguration.java   | 6 +++---
 .../java/org/apache/camel/component/kafka/KafkaEndpoint.java   | 4 ++--
 .../org/apache/camel/component/kafka/KafkaComponentTest.java   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f25c0e28/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index 06f1de1..6a0ae4a 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -118,7 +118,7 @@ public class KafkaConfiguration {
     private String keySerializerClass;
 
     @UriParam(label = "producer", defaultValue = "1")
-    private Integer requestRequiredAcks = 1;
+    private String requestRequiredAcks = "1";
     //buffer.memory
     @UriParam(label = "producer", defaultValue = "33554432")
     private Integer bufferMemorySize = 33554432;
@@ -865,7 +865,7 @@ public class KafkaConfiguration {
         this.bufferMemorySize = bufferMemorySize;
     }
 
-    public Integer getRequestRequiredAcks() {
+    public String getRequestRequiredAcks() {
         return requestRequiredAcks;
     }
 
@@ -882,7 +882,7 @@ public class KafkaConfiguration {
      * acks=all This means the leader will wait for the full set of in-sync replicas to acknowledge
the record. This guarantees that the
      * record will not be lost as long as at least one in-sync replica remains alive. This
is the strongest available guarantee.
      */
-    public void setRequestRequiredAcks(Integer requestRequiredAcks) {
+    public void setRequestRequiredAcks(String requestRequiredAcks) {
         this.requestRequiredAcks = requestRequiredAcks;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f25c0e28/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
index 999be5d..7303c44 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
@@ -419,7 +419,7 @@ public class KafkaEndpoint extends DefaultEndpoint implements MultipleConsumersS
         configuration.setSslKeyPassword(sslKeyPassword);
     }
 
-    public Integer getRequestRequiredAcks() {
+    public String getRequestRequiredAcks() {
         return configuration.getRequestRequiredAcks();
     }
 
@@ -479,7 +479,7 @@ public class KafkaEndpoint extends DefaultEndpoint implements MultipleConsumersS
         return configuration.getSslCipherSuites();
     }
 
-    public void setRequestRequiredAcks(Integer requestRequiredAcks) {
+    public void setRequestRequiredAcks(String requestRequiredAcks) {
         configuration.setRequestRequiredAcks(requestRequiredAcks);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f25c0e28/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
index 1c2c564..6a3773a 100644
--- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaComponentTest.java
@@ -59,7 +59,7 @@ public class KafkaComponentTest {
 
         KafkaEndpoint endpoint = new KafkaComponent(context).createEndpoint(uri, remaining,
params);
 
-        assertEquals(new Integer(0), endpoint.getRequestRequiredAcks());
+        assertEquals("1", endpoint.getRequestRequiredAcks());
         assertEquals(new Integer(1), endpoint.getBufferMemorySize());
         assertEquals(new Integer(10), endpoint.getProducerBatchSize());
         assertEquals(new Integer(12), endpoint.getConnectionMaxIdleMs());
@@ -155,7 +155,7 @@ public class KafkaComponentTest {
     }
 
     private void setProducerProperty(Map<String, Object> params) {
-        params.put("requestRequiredAcks", 0);
+        params.put("requestRequiredAcks", "1");
         params.put("bufferMemorySize", 1);
         params.put("compressionCodec", "none");
         params.put("retries", 0);


Mime
View raw message