THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
case class MessageAndMetadata[T](message: T, topic: String = "", offset: Long = -1L) |
The {{ Wiki Markup KafkaStream
\[T
\]
}}'s iterator is a {{ConsumerIterator
\[T
\]
}} which is an iterator over {{MessageAndMetadata
\[T
\]
}} objects.
Can we eliminate the need for two methods in the API? Also, providing a topic-count-map in the createMessageStreams
API is burdensome. Can we get rid of that?
...
Code Block |
---|
/** * Create a list of MessageStreams for each topic. * * @param topicCountMap a map of (topic, #streams) pair * @return a map of (topic, list of KafkaMessageStream) pair. The number of items in the * list is #streams. Each KafkaMessageStream supports an iterator of messages. */ def createMessageStreams[T](topicCountMap: Map[String,Int], decoder: Decoder[T] = new DefaultDecoder) : Map[String,List[KafkaMessageStream[T]]] |