Skip to content

Commit

Permalink
KAFKA-2313: javadoc fix for KafkaConsumer deserialization; reviewed b…
Browse files Browse the repository at this point in the history
…y Guozhang Wang
  • Loading branch information
onurkaraman authored and guozhangwang committed Jul 7, 2015
1 parent 826276d commit f13dd80
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
* props.put("enable.auto.commit", "true");
* props.put("auto.commit.interval.ms", "1000");
* props.put("session.timeout.ms", "30000");
* props.put("key.serializer", "org.apache.kafka.common.serializers.StringSerializer");
* props.put("value.serializer", "org.apache.kafka.common.serializers.StringSerializer");
* props.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
* props.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
* KafkaConsumer<String, String> consumer = new KafkaConsumer<String, String>(props);
* consumer.subscribe("foo", "bar");
* while (true) {
Expand All @@ -159,8 +159,8 @@
* to it. If it stops heartbeating for a period of time longer than <code>session.timeout.ms</code> then it will be
* considered dead and it's partitions will be assigned to another process.
* <p>
* The serializers settings specify how to turn the objects the user provides into bytes. By specifying the string
* serializers we are saying that our record's key and value will just be simple strings.
* The deserializer settings specify how to turn bytes into objects. For example, by specifying string deserializers, we
* are saying that our record's key and value will just be simple strings.
*
* <h4>Controlling When Messages Are Considered Consumed</h4>
*
Expand All @@ -183,8 +183,8 @@
* props.put(&quot;enable.auto.commit&quot;, &quot;false&quot;);
* props.put(&quot;auto.commit.interval.ms&quot;, &quot;1000&quot;);
* props.put(&quot;session.timeout.ms&quot;, &quot;30000&quot;);
* props.put(&quot;key.serializer&quot;, &quot;org.apache.kafka.common.serializers.StringSerializer&quot;);
* props.put(&quot;value.serializer&quot;, &quot;org.apache.kafka.common.serializers.StringSerializer&quot;);
* props.put(&quot;key.deserializer&quot;, &quot;org.apache.kafka.common.serialization.StringDeserializer&quot;);
* props.put(&quot;value.deserializer&quot;, &quot;org.apache.kafka.common.serialization.StringDeserializer&quot;);
* KafkaConsumer&lt;String, String&gt; consumer = new KafkaConsumer&lt;String, String&gt;(props);
* consumer.subscribe(&quot;foo&quot;, &quot;bar&quot;);
* int commitInterval = 200;
Expand Down

0 comments on commit f13dd80

Please sign in to comment.