kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hsy541@gmail.com" <hsy...@gmail.com>
Subject KafkaStream bug?
Date Mon, 14 Oct 2013 19:05:10 GMT
I found some weird behavior,
I follow the exact code example for HighlevelConsumer

https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example#

but add one debug line here
"
    public void run() {
        ConsumerIterator<byte[], byte[]> it = m_stream.iterator();
        while (it.hasNext()){

* ////////////////////////////////////////////my line
here//////////////////////////////////////////////////*
* System.out.println("from the stream" + m_stream); \\This line will be
blocked. KafkaStream.toString() is a blocking method?????*
* /////////////////////////////////////////// end of my line
///////////////////////////////////////////////////////*
*
*
            System.out.println("Thread " + m_threadNumber + ": " + new
String(it.next().message()));
 }
        System.out.println("Shutting down Thread: " + m_threadNumber);
    }
"

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message