Kafka message stream 怎么使用??
stream 的用法不是很清楚。
比如下面這一段代碼:
Map<String, Integer> topicCount = new HashMap<String, Integer>(); topicCount.put(topic, 1); Map<String, List<KafkaStream<byte[], byte[]>>> streams = consumerConnector.createMessageStreams(topicCount);
這樣是對這個t<愛尬聊_百科大全>opic獲取一個stream對象,通過迭代器獲取消息。
但是如果要是吧#Stream改成大于1的數字,比如3。
這樣又是什么意思啊,是在partition為3的時候這樣設置嗎?
取出來3個stream又該怎么使用?
