-Re: Code Example for createMessageStreams
Jun Rao 2013-06-05, 14:47
Yes, but it shouldn't be hard to extend the example. Basically, in the
stream iterator, you can do it.next().key() and the return type should be
of type K. Let us know if you need more help on this.
On Wed, Jun 5, 2013 at 12:43 AM, Vadim Keylis <[EMAIL PROTECTED]> wrote:
> Good evening Jun. The paged you pointed me out does not have example where
> createMessageStreams method takes two decoder objects. The example contains
> only for API where topicMap been passed.
> Thanks in advance,
> Sent from my iPad
> On Jun 4, 2013, at 7:50 AM, Jun Rao <[EMAIL PROTECTED]> wrote:
> > For 0.8, you can find the example in the following wiki.
> > https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example
> > Thanks,
> > Jun
> > On Tue, Jun 4, 2013 at 12:56 AM, Vadim Keylis <[EMAIL PROTECTED]>
> >> Good evening. Would it be possible to get sample code where the api
> >> is used in the consumer with sample of Decoder.
> >> public <K,V> Map<String, List<KafkaStream<K,V>>>
> >> createMessageStreams(Map<String, Integer> topicCountMap, Decoder<K>
> >> keyDecoder, Decoder<V> valueDecoder);
> >> Thanks so much in advance,
> >> Vadim