[ 
https://issues.apache.org/jira/browse/KAFKA-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950899#comment-13950899
 ] 

Andrew Olson commented on KAFKA-1179:
-------------------------------------

Using the Java API, calling createMessageStreams(...) multiple times using the 
same consumer connector instance appears to cause the consumer to hang in 
registerConsumerInZK(...), since a fresh timestamp value is generated for the 
consumer subscription. At a minimum, it should be clearly documented that this 
is not valid usage of the API.

The following messages are continually logged.
{code}
kafka.utils.ZkUtils$ - I wrote this conflicted ephemeral node 
[{"version":1,"subscription":{"topic":1},"pattern":"static","timestamp":"1396019252998"}]
 at /consumers/test/ids/test_MAC-AO6517-1396019241689-631e0040 a while back in 
a different session, hence I will backoff for this node to be deleted by 
Zookeeper and retry
2014-03-28 10:08:39,086 [main] INFO  kafka.utils.ZkUtils$ - conflict in 
/consumers/test/ids/test_MAC-AO6517-1396019241689-631e0040 data: 
{"version":1,"subscription":{"topic":1},"pattern":"static","timestamp":"1396019252998"}
 stored data: 
{"version":1,"subscription":{"topic":1},"pattern":"static","timestamp":"1396019241812"}
{code}

We're using version 0.8.1.

> createMessageStreams() in javaapi.ZookeeperConsumerConnector does not throw
> ---------------------------------------------------------------------------
>
>                 Key: KAFKA-1179
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1179
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 0.8.0
>            Reporter: Vincent Rischmann
>            Assignee: Neha Narkhede
>
> In kafka.consumer.javaapi.ZookeeperConsumerConnector.scala, the 
> createMessageStreams() directly calls underlying.consume() (line 80)
> In kafka.consumer.ZookeeperConsumerConnector.scala, the 
> createMessageStreams() throws an exception if it has been called more than 
> once (line 133). 
> The javaapi should throw if it is called more than once, just like the scala 
> api.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to