[
https://issues.apache.org/jira/browse/KAFKA-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950256#comment-13950256
]
schandr commented on KAFKA-1343:
--------------------------------
Thanks for pointing me to the above link.
The kafka.tools.ConsumerOffsetChecker tool helped me...I think I found what is
causing the issue..but trying to understand the why part though.
Here is my configuration
Kafka 0.8.0
Each topic has 2 partition
one broker
0 replicas
I copied the producer code from the link below to send message to both
partitions. I need this because, my consumer code, is using number of threads
per partition
https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example
I started the producer and I can see the messages sent to both the partition.
> Kafka consumer iterator thread stalls
> -------------------------------------
>
> Key: KAFKA-1343
> URL: https://issues.apache.org/jira/browse/KAFKA-1343
> Project: Kafka
> Issue Type: Bug
> Reporter: schandr
> Attachments: producerscreenshot.jpg
>
>
> My dev enviornment has Kafka 0.8.0. I am using High level consumer API. My
> use case has one topic with 2 partitions. My code is using two threads to
> read from the kafka stream. The runnable iterator task has the below
> implementation
> public void run() {
> ConsumerIterator<byte[], byte[]> it = stream.iterator();
> while (it.hasNext()){
> MessageAndMetadata<byte[], byte[]> msgAndmtdata = it.next();
> byte message[] = msgAndmtdata.message();
> long offset = msgAndmtdata.offset();
> MessageAndOffset msgAndOffst = new
> MessageAndOffset(message, offset);
> System.out.println(" Message offset for topic : " +
> topicName + ": " + offset + "thread :" + thread + "Message: " + new
> String(message));
>
> }
> }
> I am using kafka console producer to produce messages. When the test starts,
> the above logs the messages produced so far, but stalls for new messages
> produced by the console producer. No exception in the kafka logs.
--
This message was sent by Atlassian JIRA
(v6.2#6252)