<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Kafka verifiable consumer never shuts down in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-verifiable-consumer-never-shuts-down/m-p/224188#M79714</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12513/jknulst.html" nodeid="12513"&gt;@Jasper&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Looks like you are hitting: &lt;A href="https://issues.apache.org/jira/browse/KAFKA-6130" target="_blank"&gt;https://issues.apache.org/jira/browse/KAFKA-6130&lt;/A&gt; and its fixed in Kafka 1.1.0. As you are using HDF 3.1.1, it comes with Kafka 1.0.0.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jun 2018 11:29:45 GMT</pubDate>
    <dc:creator>dbains</dc:creator>
    <dc:date>2018-06-20T11:29:45Z</dc:date>
    <item>
      <title>Kafka verifiable consumer never shuts down</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-verifiable-consumer-never-shuts-down/m-p/224187#M79713</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I run a verifiable consumer on HDF-3.1.1 but it never exits.&lt;/P&gt;&lt;PRE&gt;echo -e "max.poll.records=1\nenable.auto.commit=true\nauto.commit.interval.ms=1" &amp;gt; /tmp/consumer.config &amp;amp;&amp;amp; /usr/hdf/3.1.1.0-35/kafka/bin/kafka-verifiable-consumer.sh --broker-list rjk-hdf-m:6667,rjk-hdf-s-01:6667,rjk-hdf-s-02:6667 --topic truck_speed_events_only_avro_keyed_non_transactional --reset-policy earliest --consumer.config /tmp/consumer.config --group-id test_group --verbose --max-messages 10&lt;/PRE&gt;&lt;P&gt;The output is according to expectations (at first):&lt;/P&gt;&lt;PRE&gt;{"timestamp":1529393105586,"name":"startup_complete"}
{"timestamp":1529393105824,"name":"partitions_revoked","partitions":[]}
{"timestamp":1529393108933,"name":"partitions_assigned","partitions":[{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":2},{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1},{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":0}]}
{"timestamp":1529393109005,"name":"record_data","key":"95","value":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0004\u0000\u0000\u0000\u0001.2018-05-28 19:43:05.689�����X\"truck_speed_event�\u00010\u001ANadeem Asghar\u0006:Saint Louis to Chicago Route2�\u0001","topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1,"offset":0}
{"timestamp":1529393109008,"name":"records_consumed","count":1,"partitions":[{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1,"count":1,"minOffset":0,"maxOffset":0}]}
{"timestamp":1529393109024,"name":"offsets_committed","offsets":[{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1,"offset":1}],"success":true}
{"timestamp":1529393109032,"name":"record_data","key":"65","value":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0004\u0000\u0000\u0000\u0001.2018-05-28 19:43:05.734�����X\"truck_speed_event�\u00014\u0016Don Hilborn\u00006Saint Louis to Tulsa Route2�\u0001","topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1,"offset":1}
{"timestamp":1529393109032,"name":"records_consumed","count":1,"partitions":[{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1,"count":1,"minOffset":1,"maxOffset":1}]}
{"timestamp":1529393109039,"name":"offsets_committed","offsets":[{"topic":"truck_speed_events_only_avro_keyed_non_transactional","partition":1,"offset":2}],"success":true}
ETC. ETC. ETC.




&lt;/PRE&gt;&lt;P&gt;but after the parameterized 10 messages have been consumed the util just keeps running forever with the following screen output:&lt;/P&gt;&lt;PRE&gt;{"timestamp":1529393109144,"name":"records_consumed","count":1,"partitions":[]}
{"timestamp":1529393109144,"name":"offsets_committed","offsets":[],"success":true}
{"timestamp":1529393109144,"name":"records_consumed","count":1,"partitions":[]}
{"timestamp":1529393109144,"name":"offsets_committed","offsets":[],"success":true}
{"timestamp":1529393109144,"name":"records_consumed","count":1,"partitions":[]}
{"timestamp":1529393109144,"name":"offsets_committed","offsets":[],"success":true}
{"timestamp":1529393109145,"name":"records_consumed","count":1,"partitions":[]}
&lt;/PRE&gt;&lt;P&gt;Why wouldn't the verifiable consumer just stop after --max-messages is reached?&lt;/P&gt;&lt;P&gt;On the source code of the verifiable consumer &lt;A href="https://github.com/hortonworks/kafka/blob/be8808dd4b4c67add4cd3b5adbc54b263a027831/tools/src/main/java/org/apache/kafka/tools/VerifiableConsumer.java"&gt;(source)&lt;/A&gt; there is a method that should break the while loop:&lt;/P&gt;&lt;PRE&gt;private boolean isFinished() {        return hasMessageLimit() &amp;amp;&amp;amp; consumedMessages &amp;gt;= maxMessages;    }&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 14:36:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-verifiable-consumer-never-shuts-down/m-p/224187#M79713</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2018-06-19T14:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka verifiable consumer never shuts down</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-verifiable-consumer-never-shuts-down/m-p/224188#M79714</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12513/jknulst.html" nodeid="12513"&gt;@Jasper&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Looks like you are hitting: &lt;A href="https://issues.apache.org/jira/browse/KAFKA-6130" target="_blank"&gt;https://issues.apache.org/jira/browse/KAFKA-6130&lt;/A&gt; and its fixed in Kafka 1.1.0. As you are using HDF 3.1.1, it comes with Kafka 1.0.0.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 11:29:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-verifiable-consumer-never-shuts-down/m-p/224188#M79714</guid>
      <dc:creator>dbains</dc:creator>
      <dc:date>2018-06-20T11:29:45Z</dc:date>
    </item>
  </channel>
</rss>

