You can set the "" to have a ConsumerTimeoutException thrown if the broker doesn't respond within that time period:

      var done = False
      val consumerIterator = initConsumer()
      while(true) {
        try {
          val messageAndMetadata = // Blocks until a new message is available or timeout is reached
          val message = messageAndMetadata.message
          val offset = messageAndMetadata.offset
          System.out.println(new String(message, "UTF-8")) // For debugging purposes

          parseMessage( message, offset)
        catch {
          case t: ConsumerTimeoutException => return
          case e => {
            println("unexpected exception: ")
      } // End while loop



On Jul 25, 2013, at 10:56 AM, Rob Withers <[EMAIL PROTECTED]> wrote:

NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB