kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang <teddyyyy...@gmail.com>
Subject generics type for Producer and Consumer do not need to match?
Date Thu, 05 Feb 2015 20:11:03 GMT
in the example

we use a String,String for <K,V>

in the same set of example

on the consumer side we use byte[], byte[] for K,V
        ConsumerIterator<byte[], byte[]> it = m_stream.iterator();

we tested in our own code that the above producer-consumer pair does work.

so the K,V types on the 2 sides do NOT need to match? if we argue that
"everything has to come down to byte[], then maybe we don't need the
generics types on the consumer side? in other words, how do we determine
the K,V types on consumer side?


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