-Re: kafka key serializer
Neha Narkhede 2013-04-12, 15:39
It defaults both key and value serializer to DefaultEncoder, but you
can customize both independently through "key.serializer.class" and
"serializer.class" config options.
On Fri, Apr 12, 2013 at 8:33 AM, Soby Chacko <[EMAIL PROTECTED]> wrote:
> Thanks for the reply. But, when I did some more research, it seems like its
> using the same encoder for both. For example, if I provide serializer.class
> explicitly, this serializer is used for both key and value. However, if I
> don't specify any serializer, then it appears that Kafka defaults to
> DefaultEncoder. Is that what you ment?
> Thanks again!!
> Soby Chacko
> On Wed, Apr 10, 2013 at 1:59 PM, Neha Narkhede <[EMAIL PROTECTED]>wrote:
>> It will use DefaultEncoder.
>> On Wed, Apr 10, 2013 at 8:27 AM, Soby Chacko <[EMAIL PROTECTED]> wrote:
>> > If I don't provide an explicit key serializer but a serializer class (for
>> > value encoding), and then use a key in KeyedMessage, what will be the
>> > encoder used for key? Is it going to default to the same encoder used for
>> > value or the DefaultEncoder?
>> > Thanks,
>> > Soby Chacko