You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by adrien ruffie <ad...@hotmail.fr> on 2018/02/21 21:28:21 UTC

difference between key.serializer & default.key.serde

Hello all I read the documentation but I not really understand the different between


default.key.serde and key.serializer + key.deserializer


and


default.value.serde and value.serializer + value.deserializer


I don't understand the differents usages ...


Can you enlighten le a little more please ?


Best regards,


Adrien

RE: difference between key.serializer & default.key.serde

Posted by adrien ruffie <ad...@hotmail.fr>.
Hello Matthias,


great thank for your response. I knew difference between deserializer --> consumer and serializer --> producer


But I don't knew the differences between low and high API 😊


I take a notes.


Thank again & best regards.


Adrien

________________________________
De : Matthias J. Sax <ma...@confluent.io>
Envoyé : mercredi 21 février 2018 23:45:26
À : users@kafka.apache.org
Objet : Re: difference between key.serializer & default.key.serde

It's different abstractions use in different APIs.

Consumer API:

Only reads data (with a single type) and thus uses as deserializer and
config `key.deserializer`.


Producer API:

Only writes data (with a single type) and thus uses a serializer and
config `key.serializer`.


Streams API:

Reads and writes data and uses Serde (short for SerializerDeserializer).
It's a wrapper class for a serializer and deserializer at once. Thus,
the used config is `default.key.serde`. It's name uses prefix `default`
as you can overwrite the Serde specified in the config at operator
level. In Streams API, you usually handle more than one data type and
thus usually need more than one Serde.


-Matthias

On 2/21/18 1:28 PM, adrien ruffie wrote:
> Hello all I read the documentation but I not really understand the different between
>
>
> default.key.serde and key.serializer + key.deserializer
>
>
> and
>
>
> default.value.serde and value.serializer + value.deserializer
>
>
> I don't understand the differents usages ...
>
>
> Can you enlighten le a little more please ?
>
>
> Best regards,
>
>
> Adrien
>


Re: difference between key.serializer & default.key.serde

Posted by "Matthias J. Sax" <ma...@confluent.io>.
It's different abstractions use in different APIs.

Consumer API:

Only reads data (with a single type) and thus uses as deserializer and
config `key.deserializer`.


Producer API:

Only writes data (with a single type) and thus uses a serializer and
config `key.serializer`.


Streams API:

Reads and writes data and uses Serde (short for SerializerDeserializer).
It's a wrapper class for a serializer and deserializer at once. Thus,
the used config is `default.key.serde`. It's name uses prefix `default`
as you can overwrite the Serde specified in the config at operator
level. In Streams API, you usually handle more than one data type and
thus usually need more than one Serde.


-Matthias

On 2/21/18 1:28 PM, adrien ruffie wrote:
> Hello all I read the documentation but I not really understand the different between
> 
> 
> default.key.serde and key.serializer + key.deserializer
> 
> 
> and
> 
> 
> default.value.serde and value.serializer + value.deserializer
> 
> 
> I don't understand the differents usages ...
> 
> 
> Can you enlighten le a little more please ?
> 
> 
> Best regards,
> 
> 
> Adrien
>